summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dc32dd0)
where $0 is just the script name, without any directory. Bourne
shell does that if the script is found using PATH.
and all post(8)/send(1) switches
mhmail with no arguments is equivalent to inc'
and all post(8)/send(1) switches
mhmail with no arguments is equivalent to inc'
+
+#### Find directory of this script. Bourne shell just puts the program
+#### name in $0 if it's found from the PATH, so search that if necessary.
+finddir() {
+ case $0 in
+ */*) dirname $1 ;;
+ * ) IFS=:
+ for d in $PATH; do
+ [ -f "${d:=.}/$1" -a -x "$d/$1" ] && printf "$d" && break
+ done ;;
+ esac
+}
+
+bindir=`finddir $0`
nmhbindir=`cd "${bindir}" && pwd`
nmhbindir=`cd "${bindir}" && pwd`
#### Checks for missing mandatory arguments.
checkforargs() {
if [ ${attacharg} -eq 1 ]; then
#### Checks for missing mandatory arguments.
checkforargs() {
if [ ${attacharg} -eq 1 ]; then
use_send=0 ## use post (default) or send (-profile)
sendsw=1 ## to send (default) or not to send
for arg in "$@"; do
use_send=0 ## use post (default) or send (-profile)
sendsw=1 ## to send (default) or not to send
for arg in "$@"; do
#### Post and send won't accept -f -or -s because they'd be
#### ambiguous, so no conflicts with them. And they don't have
#### -b, -c, -r, -t. For the new switches that compiled mhmail
#### Post and send won't accept -f -or -s because they'd be
#### ambiguous, so no conflicts with them. And they don't have
#### -b, -c, -r, -t. For the new switches that compiled mhmail