phs@lifia.imag.fr (Philippe Schnoebelen) (10/10/90)
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.$$ instead of simply /tmp/mail-file.$$ Is there some official place where the latest version can be ftp'ed ? Is there someone maintaining this program ? I won't patch untarmail if someone already did this better. Thanks for any info ! --Philippe
a3@rivm.nl (Adri Verhoef) (10/11/90)
>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. ]