X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/46f35e659f3bc3e808a70263bea0ec72624c8a08..6db4565184f61a8fa55e32296fdad530ebf00d6b:/etc/sendfiles?ds=sidebyside diff --git a/etc/sendfiles b/etc/sendfiles index 85e8a49a..18b714a2 100755 --- a/etc/sendfiles +++ b/etc/sendfiles @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # # Sends multiple files and/or directories in a MIME message. # Requires tar and any specified compression program. @@ -32,8 +32,16 @@ finddir() { esac } +help() { + printf '%s\n' "$usage" + #### Print the nmh intro text. + ${nmhbindir}/mhparam -help | sed -n -e '/^$/,$p' + exit +} + die() { - printf '%s\n' "$usage"; exit ${1:-1} + printf '%s\n' "$usage" + exit ${1:-1} } bindir=`finddir $0` @@ -61,7 +69,7 @@ for arg in "$@"; do -f|-fr|-fro|-from) fromarg=1 ;; #### Support -gzip for backward compatibility. -gzip) compress=gzip ;; - -h|-he|-hel|-help) die 0 ;; + -h|-he|-hel|-help) help ;; #### Support -none for backward compatibility. -none) compress=none ;; -s|-su|-sub|-subj|-subje|-subjec|-subject) subjectarg=1 ;;