"Fossies" - the Fresh Open Source Software Archive

Member "usr/local/share/PeaZip/FreeDesktop_integration/nautilus-scripts/Archiving/PeaZip/Extract Archive" (9 Sep 2009, 820 Bytes) of package /linux/misc/peazip-6.9.2.LINUX.Qt.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 
    3 # PeaZip Nautilus script
    4 #
    5 # AUTHOR: Giorgio Tani, basing on Gias Kay Lee modification of Chris Giles' script
    6 # VERSION: 0.1
    7 
    8 APPLICATION="PeaZip"
    9 TITLE="Error"
   10 MESSAGE="Could not find the $APPLICATION executable."
   11 basedir="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`"
   12 
   13 if which peazip 2> /dev/null
   14 then
   15     peazip -ext2main "$basedir/$1"
   16 else
   17     # Show an error message
   18     if which nautilus-error-dialog; then
   19         nautilus-error-dialog --title "$TITLE" --message "$MESSAGE"
   20     elif which gdialog; then
   21         gdialog --title "$TITLE" --msgbox "$MESSAGE" 20 100
   22     elif which kdialog; then
   23         kdialog --title "$TITLE" --msgbox "$MESSAGE"
   24     elif which gxmessage; then
   25         gxmessage -buttons OK -title "$TITLE" "$MESSAGE"
   26     elif which xmessage; then
   27         xmessage -buttons OK -title "$TITLE" "$MESSAGE"
   28     fi
   29 fi