: "@(#)shar.sh 1.8" #! /bin/sh # # This is a shell archive. # Remove everything above this line and run sh on the resulting file. # If this archive is complete, you will see this message at the end: # "All files extracted" # # Created: Thu Jul 29 17:21:17 CDT 1999 by walt # # Files archived in this archive: # shar # #-------------------- if [ -f shar -a "$1" != "-c" ] then echo shar: shar already exists else echo 'x - shar (1455 characters)' sed -e 's/^X//' >shar <<'SHAR-EOF' X: "@(#)shar.sh 1.8" X# X# Create shell archive from files listed in argument list X Xcase "$1" in X-s) silent=yes X shift X ;; X--) shift X ;; X-*) echo "Usage: $0 [-s] file ..." >&2 X exit 1 X ;; Xesac X Xcase $# in X0) echo "Usage: $0 [-s] file ..." >&2 X exit 1 X ;; Xesac X Xcat <&2 X continue X fi X bname=`basename $file` X if [ "$silent" != yes ] X then X echo "a - $bname" >&2 X fi X if [ ! -r $file ] X then X echo "$0: Can't read $file" >&2 X exit 1 X else X size=`/bin/ls -l $file | sed 's/[ ][ ]*/ /g' | cut -f5` X echo "#--------------------" X echo "if [ -f $bname -a \"\$1\" != \"-c\" ]" X echo "then echo shar: $bname already exists" X echo "else" X echo "echo 'x - $bname ($size characters)'" X echo "sed -e 's/^X//' >$bname <<'SHAR-EOF'" X sed -e 's/^/X/' $file X echo "SHAR-EOF" X echo "if [ \`wc -c <$bname\` -ne $size ]" X echo "then echo shar: $bname unpacked with wrong size" X echo "fi" X echo "# end of overwriting check" X echo "fi" X fi Xdone Xecho "echo All files extracted" Xecho "exit 0" SHAR-EOF if [ `wc -c