3 # Extract the contents of an archive file to a
4 # temporary folder under /tmp.
6 # Open a new Geeqie window pointing to that folder.
8 full_path=$(realpath "$1")
9 filename=$(basename -- "$1")
10 extension="${filename#*.}"
15 if [ $(which unzip > /dev/null; echo $? ) = 0 ]
17 rm --recursive --force "/tmp/geeqie-archive/$full_path"
18 mkdir --parents "/tmp/geeqie-archive/$full_path"
19 unzip "$full_path" -d "/tmp/geeqie-archive/$full_path" > /dev/null
20 geeqie --remote --new-window "/tmp/geeqie-archive/$full_path"
22 zenity --title="Geeqie Open Archive" --info --width=300 --text="Utility unzip is not installed"
27 if [ $(which tar > /dev/null; echo $? ) = 0 ]
29 rm --recursive --force "/tmp/geeqie-archive/$full_path"
30 mkdir --parents "/tmp/geeqie-archive/$full_path"
31 tar --extract --gunzip --directory "/tmp/geeqie-archive/$full_path" --file="$full_path" > /dev/null
32 geeqie --remote --new-window "/tmp/geeqie-archive/$full_path"
34 zenity --title="Geeqie Open Archive" --info --width=300 --text="Utility tar is not installed"
39 if [ $(which unrar > /dev/null; echo $? ) = 0 ]
41 rm --recursive --force rf "/tmp/geeqie-archive/$full_path"
42 mkdir --parents "/tmp/geeqie-archive/$full_path"
43 unrar "$full_path" "/tmp/geeqie-archive/$full_path" > /dev/null
44 geeqie --remote --new-window "/tmp/geeqie-archive/$full_path"
46 zenity --title="Geeqie Open Archive" --info --width=300 --text="Utility unrar is not installed"
51 zenity --title="Geeqie Open Archive" --info --width=300 --text="This is not a known archive file type"