#!/bin/csh -f
# gzipdir by jun
# Usage: pressdir directory

if ($#argv == 0) goto err

while ($#argv)
	if (-d $1) then
		set dirname = `echo $1 | sed s/"\/"//`
		echo $dirname
		tar zcvf $dirname.tar.gz $dirname
	else echo "directory $1 does not exist"
	endif
	shift
end
exit 0					#normal exit

err:
echo Usage: $0 "<dircetory>"
exit 1					#err exit


