File: sndAppleSingle

package info (click to toggle)
metamail 2.7-34
  • links: PTS
  • area: main
  • in suites: potato
  • size: 932 kB
  • ctags: 668
  • sloc: ansic: 7,986; sh: 1,661; csh: 229; makefile: 202
file content (40 lines) | stat: -rwxr-xr-x 975 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh -e
#
# 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