X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6e04c69fadd2c8534aa28ca7d115e7bbedbf1608..d42ab414c8bce17b6b437ef9ebfd194a8ac4111c:/etc/sendfiles?ds=sidebyside diff --git a/etc/sendfiles b/etc/sendfiles index b3f49716..85e8a49a 100755 --- a/etc/sendfiles +++ b/etc/sendfiles @@ -12,7 +12,7 @@ usage='Usage: sendfiles [switches] -to recipient -subject subject '"\ or sendfiles [switches] recipient subject file1 [file2 ...] switches are: - -compress [bzip2 | compress | gzip | lzma | none | zip] + -compress [bzip2 | compress | gzip | lzma | none] -from -[delay] (expressed in seconds) -version @@ -38,7 +38,7 @@ die() { bindir=`finddir $0` nmhbindir=`cd "$bindir" && pwd` -nmhlibdir=`$nmhbindir/mhparam libdir` +nmhlibexecdir=`$nmhbindir/mhparam libexecdir` #### Process switches. @@ -67,7 +67,7 @@ for arg in "$@"; do -s|-su|-sub|-subj|-subje|-subjec|-subject) subjectarg=1 ;; -t|-to) toarg=1 ;; -v|-ve|-ver|-vers|-versi|-versio|-version) - "$nmhlibdir/viamail" -version | sed 's/viamail/sendfiles/'; exit ;; + "$nmhlibexecdir/viamail" -version | sed 's/viamail/sendfiles/'; exit ;; -*) die ;; *) if [ $compressarg -eq 1 ]; then compress="$arg" @@ -136,7 +136,7 @@ checkforargs if [ x"$from" = x ]; then if [ x"$PERSON" = x ]; then - from=`"$nmhlibdir/ap" -format '%(localmbox)' 0` + from=`"$nmhlibexecdir/ap" -format '%(localmbox)' 0` else from="$PERSON" fi @@ -145,7 +145,7 @@ fi #### Determine compression method and descriptive info. if [ x"$compress" = x ]; then - for compressor in gzip bzip2 lzma zip compress none; do + for compressor in gzip bzip2 lzma compress none; do if [ x"`finddir $compressor`" = x ]; then :; else compress="$compressor" break @@ -161,8 +161,6 @@ case $compress in conversion='; x-conversions=gzip' ;; lzma) compress='lzma -c'; uncompress='lzma -cd' conversion='; x-conversions=lzma' ;; - zip) compress='zip -q'; uncompress='unzip -p' - conversion='; x-conversions=zip' ;; none) compress=cat uncompress=cat; conversion= ;; *) printf 'sendfiles: unknown compression method "%s"\n' \ "$compress" >&2 @@ -172,7 +170,7 @@ esac #### Send using viamail. tar cvf - "$@" | $compress | \ - "$nmhlibdir/viamail" -to "$to" -subject "$subject" \ + "$nmhlibexecdir/viamail" -to "$to" -subject "$subject" \ -from "$from" -parameters "type=tar$conversion" \ -comment "extract with $uncompress | tar xvpf -" \ -delay "$delay" -verbose