Path: utzoo!attcan!uunet!mcsun!hp4nl!rivm!news From: a3@rivm.nl (Adri Verhoef) Newsgroups: comp.sources.d Subject: Re: Where can I find UNTARMAIL and related stuff Summary: Adjust the program to your own specific needs Message-ID: <1990Oct11.151200.8922@rivm.nl> Date: 11 Oct 90 15:12:00 GMT References: <6878@lifia.imag.fr> Sender: news@rivm.nl Organization: RIVM, Bilthoven, Netherlands Lines: 67 >Our version of untarmail has some misfeatures. E.g., if I try > > % untarmail ../mail-file > >it tries to discard the file by moving it to some /tmp/../mail-file.$$ I suggest you edit 'untarmail' and replace mv $1 /tmp/$1.$$ by mv $1 $1.$$ && mv $1.$$ /tmp/ >Is there some official place where the latest version can be ftp'ed? You probably have the latest version, but this 'problem' was never taken into consideration for a new release (if any). >there someone maintaining this program? I won't patch untarmail if someone >already did this better. I guess everyone adjusts this program to fit his/her own specific needs. Things to consider: Where does `compress' live? [Formerly I only had it in /usr/lib/news] Where does `uncompress' live? [Maybe "compress -d"] What is the name of the mailer? Does the mailer understand '-s' for Subject? Does `tar x' need the 'o' option? Where do the untarmail'd files go? Here is my own current (modified) version: ---- cut here ---- compress="compress" uncompress="compress -d" MAILER=Mail; [ -f /usr/bin/mailx ] && MAILER="mailx" TMPDIR=/usr/tmp case /$0 in */tarmail) if test $# -lt 3; then echo "Usage: tarmail mailpath \"subject-string\" directory-or-file(s)" exit else mailpath=$1 echo "mailpath = $mailpath" shift subject="$1" echo "subject-string = $subject" shift echo files = $* tar cvf - $* | ${compress} | btoa | ${MAILER} -s "$subject" $mailpath fi ;; */untarmail) if [ $# -ge 1 ]; then atob < $1 | ${uncompress} | tar xovf - mv $1 $TMPDIR/$1.$$ echo tarmail file moved to: $TMPDIR/$1.$$ else atob | ${uncompress} | tar xovf - fi ;; esac ---- end of cut ---- [PS. "mv $1 $TMPDIR/$1.$$" has not yet been replaced by my suggestion above. ]