:   HINT
telluser $0
H='
==========
sbundle file(s)
==========
assemble the named text files into a single file that permits
later restoration by the shell with the command

sh archive

==========
-f name		get file list from named file
-f -        get file list from stdin
-k			use Kencode to encode the files.
==========
BUGS
==========
1)  bundled files must be in the current directory.
2)  names must be given as name or ./name.
3)  the archival method does not save time of modification
    information
4)  does not work with binary files unless kencode is used
==========
'
L=!
M=C
N=
F=
O=
while   :
do
case $1 in
    -h|help|hint)   echo "$H" | more;exit 0;;
    -x) set -x;;
    -v) set -v;;
	-f)	shift;L=$1;;
	-k)	M=K;;
	-T)	M=!;;
    *)  F="$F $1";;
esac
case $# in
    0)  break;;
    1)  break;;
    *)  shift;;
esac
case $L in
	!)	;;
	-)	F=`cat -`;;
	*)	F=`cat $L`;;
esac
done
for f in $F
do
echo 1>&2 $f
:   reconstruction command
case $M in
	K)	echo "echo kencode file $f";;
esac
echo "if test -r $f;then chmod 755 $f;fi;"
echo "cat > $f <<\\END_$f"
:   add the file
case $M in
	!)	;;
	K)	kencode.x -e $f;;
	C)	cat $f;;
esac
:   end of the file marker
echo "END_$f"
done
echo 1>&2 "done"
