File: doxcommand

package info (click to toggle)
smartlist 3.15-28
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,308 kB
  • sloc: ansic: 9,238; sh: 4,901; makefile: 118
file content (60 lines) | stat: -rwxr-xr-x 1,640 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/sh
: &&O='cd .' || exec /bin/sh "$0" $argv:q # we're in a csh, feed myself to sh
$O || exec /bin/sh "$0" "$@"		  # we're in a buggy zsh
#########################################################################
#	doxcommand	To send of X-Command mails			#
#									#
#	Created by S.R. van den Berg, The Netherlands			#
#									#
#	Customise to taste.						#
#########################################################################
#$Id: doxcommand,v 1.7 1994/09/20 19:33:27 berg Exp $

#
# Edit the following three definitions to suit your list
#

listrequest=yourlist-request@some.where
maintainer=yourname@some.where
password=x_command_password

#
# In a standard environment you shouldn't need to make any changes below
# this line
#

test=test			# /bin/test
echo=echo			# /bin/echo
sendmail=/usr/lib/sendmail	# /usr/lib/sendmail

$test $# = 0 && $echo "Usage: $0 command [argument] ..." 1>&2 &&
 exit 64

command="$1"
shift

# Allow for abbreviations or misspellings (people are lazy by nature :-)

case "$command" in
  su*) command=subscribe ;;
  u*) command=unsubscribe ;;
  c*) command=checkdist ;;
  showd*|sd*|shd*) command=showdist ;;
  showl*|sl*|shl*) command=showlog ;;
  w*) command=wipelog ;;
  v*) command=version ;;
  h*) command=help ;;
  i*) command=info ;;
  *) $echo "Unknown command, use any of the following:" 1>&2
     $echo "subscribe, unsubscribe, checkdist, showdist, showlog," 1>&2
     $echo "wipelog, version, help or info." 1>&2
     exit 64
esac

$sendmail $listrequest <<HERE
To: $listrequest
X-Command: $maintainer $password $command $*
Subject: X-Processed: $command $* of <$listrequest>


HERE