updated on Fri Jan 13 08:00:32 UTC 2012
[aur-mirror.git] / climage / python.patch
blob7dee244e176bb62c2d44dc3e2d00da204a83521c
1 Index: climage.sh
2 ===================================================================
3 --- climage.sh (révision 30)
4 +++ climage.sh (copie de travail)
5 @@ -19,6 +19,8 @@
7 #main script for climage
9 +[ -e '/usr/bin/python2' ] && _python='/usr/bin/python2' || _python='/usr/bin/python'
11 test_first_launch(){
12 #testing if "img" is a konwn command.
13 dont_remind=0
14 @@ -79,7 +81,7 @@
15 #default
16 pic_per_line=3
17 #or conf file
18 -source ~/.climage 2> /dev/null
19 +source ~/.climage > /dev/null
21 result=0
23 @@ -88,7 +90,7 @@
25 #case: "ls" on the current directory
26 if [ $# -eq 0 ]; then
27 - python $script_path/src/ls-climage.py $pic_per_line $columns
28 + $_python $script_path/src/ls-climage.py $pic_per_line $columns
29 result=$?
30 folder=$(pwd)
31 echo "$folder" > /tmp/climage_mem_path
32 @@ -105,21 +107,21 @@
33 if [ $# -ge 1 ]; then
34 cd "$1" 2> /dev/null
36 - python $script_path/src/ls-climage.py $pic_per_line $columns
37 + $_python $script_path/src/ls-climage.py $pic_per_line $columns
38 result=$?
39 #memorize folder
40 folder=$(pwd)
41 echo "$folder" > /tmp/climage_mem_path
42 elif [ -f "$1" ]; then
43 #display one single picture from its path
44 - python $script_path/src/cat-climage.py "$1" $columns
45 + $_python $script_path/src/cat-climage.py "$1" $columns
46 result=$?
47 else
48 #display one single picture from its id
49 if [ -e "/tmp/climage_mem_path" ]; then
50 folder=$(cat /tmp/climage_mem_path)
51 cd "$folder"
52 - python $script_path/src/id-climage.py $1 $columns
53 + $_python $script_path/src/id-climage.py $1 $columns
54 result=$?
56 if [ $? -eq 2 ]; then