#!/bin/sh # # error() { echo "$1" exit 2 } # help() { cat < /dev/null; then error "You should not include directories which are lower in the tree than the current working directory" fi tempfile=/tmp/mktgz.$$ trap "rm -f $tempfile" 1 2 5 15 Xdialog --title "$pack.tar.gz" --separate-output --checklist "tick the files which should be included into the package $pack.tar.gz" 0 0 12 `find $dirs -maxdepth 1 -type f -printf "%p size=%kK OFF \n"` 2> $tempfile rval="$?" # if [ "$rval" = "0" ]; then echo "running tar -zcvf $pack.tar.gz ..." tar -zcvf "$pack.tar.gz" `cat $tempfile` else echo "Cancel..." fi rm -f $tempfile # end of mktgz