#!/bin/sh
#
# Very simple shellscript to support sending Macintosh files
# which are stored in a UNIX filesystem by the CAP AUFS program.
#
# To be able to use this script without modifications, you must
# first have the CAP package installed so you can mount the
# UNIX filesystem from the Macintosh. Second, you must have the
# program cvt2apple (which you can find in the contrib directory
# of the CAP distribution) which converts between CAP format
# to AppleSingle format.
#
# Written by Patrik Faltstrom, paf@nada.kth.se, may 1993
#

FILENAME=$1

#
# If $AFPDIR environment variable is set, all Macintosh filenames
# is based on that directory.
#

echo -n "Please give a name of the Macintosh file: "
read NAME

if [ "x$NAME" = "x" ]; then
   echo "No name given, exiting"
   exit 1
fi

echo $NAME | grep '^/' > /dev/null
if [ $? = 1 ]; then
  NAME=$AFPDIR/$NAME
fi

cvt2apple $NAME $FILENAME
echo "Included file $NAME in this mail as an AppleSingle file"
exit 0


