2 ===================================================================
3 --- climage.sh (révision 30)
4 +++ climage.sh (copie de travail)
7 #main script for climage
9 +[ -e '/usr/bin/python2' ] && _python='/usr/bin/python2' || _python='/usr/bin/python'
12 #testing if "img" is a konwn command.
18 -source ~/.climage 2> /dev/null
19 +source ~/.climage > /dev/null
25 #case: "ls" on the current directory
27 - python $script_path/src/ls-climage.py $pic_per_line $columns
28 + $_python $script_path/src/ls-climage.py $pic_per_line $columns
31 echo "$folder" > /tmp/climage_mem_path
36 - python $script_path/src/ls-climage.py $pic_per_line $columns
37 + $_python $script_path/src/ls-climage.py $pic_per_line $columns
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
48 #display one single picture from its id
49 if [ -e "/tmp/climage_mem_path" ]; then
50 folder=$(cat /tmp/climage_mem_path)
52 - python $script_path/src/id-climage.py $1 $columns
53 + $_python $script_path/src/id-climage.py $1 $columns