home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-11-30 | 29.3 KB | 1,277 lines |
- : Use /bin/sh
-
- # This is the automatically generated output of the AUTODIFF program after
- # being run on the two directories;
- # Old Directory: Elm-Posted
- # New Directory: Elm
-
- # Any problems with execution of this script should be reported to the
- # author of the program, Dave Taylor, at "hplabs!taylor". Thanks
-
- # first off, let's make sure we're running in SH
-
- export PATH || (sh $0; exit $$)
-
- # next, let's ensure the user has "ed"...
-
- if [ ! -f /bin/ed ]
- then
- echo I can\'t find /bin/ed\!
- exit 1
- fi
-
- # finally, let's get this show on the road!!
-
- #---------------------------------
- # File Elm/Configure.sh is new!
-
- echo File Elm/Configure.sh is new - extracting...
- if [ -f Configure.sh ]
- then
- echo File \'Configure.sh\' is new, but you already have something called that\!
- echo I\'m going to move your file to \'Configure.sh.old\'...
- /bin/mv -f Configure.sh Configure.sh.old
- else
- echo Extracting new file \'Configure.sh\'
- fi
-
- cat > Configure.sh << 'END_OF_FILE'
- #!/bin/sh
- #
- # Configure.sh, a shell script for configuring the Elm mail system for
- # your site and desires. This script uses some ideas ripped out
- # of the 'rn' install script. Thanks Larry!
- #
-
- export PATH || (sh $0 ; kill $$)
-
- SHELL=/bin/sh
-
- SED1=/tmp/Elm.sed1
- SED2=/tmp/Elm.sed2
-
- if [ -f /bin/rm ]
- then
- rm=/bin/rm
- else
- rm=rm
- fi
-
- $rm -f $SED1 $SED2
- touch $SED1 $SED2
- chmod 777 $SED1 $SED2
-
- # first test - is stdin still free for answering questions??
- if [ ! -t 0 ]
- then
- echo "Please use 'sh Configure.sh' rather than 'sh < Configure.sh'"
- exit 1
- fi
-
- # next let's see what sorta echo flag we have here...
-
- if [ "`echo -n`" = "-n" ]
- then
- nflag=""
- cflag="\\c"
- else
- nflag="-n"
- cflag=""
- fi
-
- # now the intro blurb
-
- cat << END_OF_INTRO
-
- Elm Configuration Script, v2
-
-
- This is the configuration script for the Elm mail system. By using
- it rather than editing the "hdrs/sysdefs.h" file, it is hoped that
- the installation process will be considerably easier.
-
- On all questions, the value in [square brackets] is the default that
- will be used if you just press RETURN...
-
-
- END_OF_INTRO
-
- echo "Trying to figure out what sort of OS you're on..."
-
- # next interesting part - figure out what OS we're on
-
- os_name=""
-
- $rm -f .osname
- touch .osname
-
- cat << 'EOF' > .get_osname
-
- uname
-
- if [ $? != 0 ]
- then
- if [ -f /vmunix ]
- then
- echo "bsd" > .osname
- else
- exit 0
- fi
- fi
-
- if [ "`uname -s`" != "" ]
- then
- uname -s | tr '[A-Z]' '[a-z]' > .osname
- fi
-
- exit 0
-
- EOF
-
- sh .get_osname > /dev/null 2>&1
-
- if [ -f .osname ]
- then
- os_name="`cat .osname`"
- $rm -f .osname
- fi
-
- $rm -f .get_osname
-
- if [ "$os_name" = "" ]
- then
- cat << THE_END
-
- I cannot figure out what sort of operating system you're running here. Please
- type in the NAME of the OS you're running or the name of the machine you're
- THE_END
-
- echo $nflag "running on. I'll check the name in a minute : " $cflag
-
- read junk morejunk
-
- os_name=`echo $junk | tr '[A-Z]' '[a-z]'`
- fi
-
- OS_FLAG="HUH??"
-
- while [ "$OS_FLAG" = "HUH??" ]
- do
-
- case $os_name in
- hp) NAME="HP-UX"; OS_FLAG="" ;;
- hp-ux) NAME="HP-UX"; OS_FLAG=""; ;;
- vax) NAME="BSD"; OS_FLAG="BSD"; ;;
- vaxen) NAME="BSD"; OS_FLAG="BSD"; ;;
- bsd) NAME="BSD"; OS_FLAG="BSD"; ;;
- uts) NAME="UTS"; OS_FLAG="UTS"; ;;
- sun) NAME="Sun BSD"; OS_FLAG="SUN"; ;;
- pyramid) NAME="Pyramid BSD"; OS_FLAG="PYRAMID"; ;;
- amdahl) NAME="UTS"; OS_FLAG="UTS"; ;;
- v5) NAME="System V"; OS_FLAG=""; ;;
- v7) NAME="System VII"; OS_FLAG=""; ;;
- eunice) NAME="Eunice"; OS_FLAG=""; ;;
- convergent) NAME="Convergent BSD"; OS_FLAG="BSD"; ;;
- berkeley) NAME="BSD"; OS_FLAG="BSD"; ;;
- ultrix) cat << THE_END
-
- I know that this is a breed of Unix, but I don't know what TYPE of OS it
- is like. Please enter the NAME of the OS that this is most like (e.g. "BSD")
- and we'll go from there.
-
- THE_END
- ;;
- xenix) cat << THE_END
-
- You're outta luck. Xenix (dumb OS that it is only allows 6 character
- identifier names. You'll need to go in and LABORIOUSLY translate all the
- VERY LONG identifier names to the right length. The correct response to
- seeing this message is to call your vendor and get ANGRY!!!!
-
- Meanwhile, we might as well just quit here. Sorry.
- THE_END
- exit 1
- ;;
- *) cat << THE_END
-
- I don't know what OS you're specifying! The only one's I know of are;
-
- HP-UX, BSD, UTS, Eunice, Xenix, Ultrix, V5, and V7
-
- I also know the machines
-
- HP, Amdahl, Sun, Vaxen, Convergent and Pyramid
-
- If you're not among this list, you'll need to pick the closest OS name.
- THE_END
-
- echo " "
- echo $nflag "Please choose again: " $cflag
- read os_name
- ;;
- esac
-
- done
-
- echo " "
- echo " "
- echo you\'re on the following version of Unix: $NAME
-
- case $OS_FLAG in
- BSD) echo "s/>os-define</-DBSD/" >> $SED2
- echo "s/>lib2</-lcurses/" >> $SED2
- ;;
-
- SUN) echo "s/>os-define</"-DBSD -DSUN"/" >> $SED2
- echo "s/>lib2</-lcurses/" >> $SED2
- ;;
-
- PYRAMID) echo "s/>os-define</"-DBSD -DNO_VAR_ARGS"/" >> $SED2
- echo "s/>lib2</-lcurses/" >> $SED2
- ;;
-
- *) echo "s/>os-define<//" >> $SED2
- echo "s/>lib2<//" >> $SED2
- ;;
-
- esac
-
- echo " "
- echo "Now we can get down to those questions..."
- echo " "
-
- cat << THE_END
-
-
- Does your site receive mail with valid "Reply-To:" and "From:" fields in
- the messages? (usually the answer is "no" since not all sites on the network
- rewrite the addresses, and this'll usually cause the return mail to fail).
- THE_END
-
- answer="no"
- echo $nflag "Are the addresses valid (y/n) [no] ?" $cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" ]
- then
- echo \
- "s/#define USE_EMBEDDED_ADDRESSES/\/** #define USE_EMBEDDED_ADDRESSES **\//" \
- >> $SED1
- fi
-
- cat << THE_END
-
- -------------------------------------------------------------------------------
-
- How about memory? If you have a lot, you can enter a fairly large number
- for the next few questions...if not, you'll probably want to enter the
- suggested small-system values. (This applies to the speed of the swapping
- on your system too - if you're on a FAST system, use the big values!)
-
- First, how many messages should be allowed in a single folder? (the suggested
- values are 1000 for blindly fast systems, 500 for average systems and 100 for
- THE_END
-
- echo $nflag "slow systems). Number of messages [500] ? " $cflag
-
- max_headers=NONE
-
- while [ "$max_headers" = "NONE" ]
- do
- read junk
-
- if [ "$junk" = "" ]
- then
- junk=500
- fi
-
- if [ $junk -gt 1000 -o $junk -lt 50 ]
- then
- echo "I think a value of $junk is pretty strange. You better answer this"
- echo "question again..."
- echo " "
- echo $nflag "How many messages per folder [500] ? " $cflag
- read junk
- else
- max_headers=$junk
- echo "s/>500</$max_headers/" >> $SED1
- fi
-
- if [ $junk -lt 200 ]
- then
- system_size="small"
- elif [ $junk -lt 750 ]
- then
- system_size="normal"
- else
- system_size="big"
- fi
- done
-
- case $system_size in
- small) default=223; ;;
- normal) default=503; ;;
- big) default=739; ;;
- esac
-
- echo " "
-
- max_saliases="NONE"
-
- while [ "$max_saliases" = "NONE" ]
- do
-
- echo $nflag "Max number of system aliases available [$default] ? " $cflag
-
- read junk
-
- if [ "$junk" = "" ]
- then
- junk=$default
- fi
-
- if [ $junk -lt 50 -o $junk -gt 1000 ]
- then
- echo "Pretty far out value for this question! I think you should reconsider"
- echo "your answer and try this question again..."
- echo " "
- else
- max_saliases=$junk
- echo "s/>503</$max_saliases/" >> $SED1
- fi
- done
-
- case $system_size in
- small) default=127; ;;
- normal) default=251; ;;
- big) default=503; ;;
- esac
-
- max_ualiases="NONE"
-
- while [ "$max_ualiases" = "NONE" ]
- do
-
- echo $nflag "Max number of user aliases available [$default] ? " $cflag
-
- read junk
-
- if [ "$junk" = "" ]
- then
- junk=$default
- fi
-
- if [ $junk -lt 50 -o $junk -gt 1000 ]
- then
- echo "Pretty far out value for this question! I think you should reconsider"
- echo "your answer and try this question again..."
- echo " "
- else
- max_ualiases=$junk
- echo "s/>251</$max_ualiases/" >> $SED1
- fi
- done
-
- case $system_size in
- small) default=50; ;;
- normal) default=150; ;;
- big) default=150; ;;
- esac
-
- max_in_weedlist="NONE"
-
- while [ "$max_in_weedlist" = "NONE" ]
- do
-
- echo $nflag "Max number of headers in weedout list [$default] ? " $cflag
-
- read junk
-
- if [ "$junk" = "" ]
- then
- junk=$default
- fi
-
- if [ $junk -lt 10 -o $junk -gt 200 ]
- then
- echo "Pretty strange answer to this question! I think you should reconsider"
- echo "and try this question again..."
- echo " "
- else
- max_in_weedlist=$junk
- echo "s/>150</$max_in_weedlist/" >> $SED1
- fi
- done
-
- cat << THE_END
-
- The next pair of questions have to do with what to do when another program has
- locked a mailbox...
-
- First, how many times should the program check for the removal of the lock
- THE_END
-
- default=6
-
- max_attempts="NONE"
-
- while [ "$max_attempts" = "NONE" ]
- do
-
- echo $nflag "file before giving up? [6] " $cflag
-
- read junk
-
- if [ "$junk" = "" ]
- then
- junk=$default
- fi
-
- if [ $junk -lt 3 -o $junk -gt 10 ]
- then
- echo \
- "The recommended range is 3-10 ...Number of times to check lock"
- else
- max_attempts=$junk
- echo "s/>6</$max_attempts/" >> $SED1
- fi
- done
-
- echo " "
- answer="no"
- echo $nflag "Should it REMOVE the lockfile after $max_attempts checks [no] ?" \
- $cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" ]
- then
- echo \
- "s/#define REMOVE_AT_LAST/\/** #define REMOVE_AT_LAST **\//" \
- >> $SED1
- fi
-
- if [ "$NAME" = "BSD" ]
- then
- ps="ps -cax"
- else
- ps="ps -ef"
- fi
-
- echo " "
- echo " "
- echo "poking about a bit.."
-
- if [ "`$ps | grep sendmail | grep -v grep`" != "" ]
- then
- echo "You're running sendmail. Well done, I guess..."
- echo "s/\/\*\* #define DONT_ADD_FROM \*\*\//#define DONT_ADD_FROM/" \
- >> $SED1
- echo \
- "s/#define USE_DOMAIN/\/** #define USE_DOMAIN **\//" \
- >> $SED1
- else
-
- cat << THE_END
-
- Since you're not running sendmail, should I check local user entered addresses
- THE_END
-
- answer="yes"
- echo $nflag "against the valid mailboxes on this system [yes] ? " $cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" -a "$answer" != "" ]
- then
- echo \
- "s/#define NOCHECK_VALIDNAME/\/** #define NOCHECK_VALIDNAME **\//" \
- >> $SED1
- fi
-
- cat << THE_END
-
- Are you running a machine where you want to have a domain name appended to the
- THE_END
-
- answer="yes"
- echo $nflag "hostname on outbound mail [no] ? " $cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" ]
- then
- echo \
- "s/#define USE_DOMAIN/\/** #define USE_DOMAIN **\//" \
- >> $SED1
- else
- echo " "
- echo $nflag "Enter the domain name (include leading '.') : " $cflag
- read answer
- echo "s/<enter your domain here>/$answer/" >> $SED1
- fi
-
- fi
-
- # next let's see if we can find the vfork command on this system..
-
- cat << EOF > .test.c
- main()
- {
- (void) vfork();
- }
- EOF
-
- cat << EOF > .vfork
- cc .test.c
- EOF
-
- sh .vfork > .log 2>& 1
-
- if [ "`wc -l .log`" -eq "0" ]
- then
- echo "You have virtual memory system calls available. Cool..."
- else
- cat << THE_END
-
- Your machine doesn't seem to have the vfork command available. Should I assume
- THE_END
-
- answer="no"
- echo $nflag "you have it, anyway [no] ? " $cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" ]
- then
- echo "s/\/\*\* #define NO_VM \*\*\//#define NO_VM/" >> $SED1
- fi
- fi
-
- $rm -f a.out .test.c .vfork .log
-
- # next let's see if we have the gethostname() system call...
-
- cat << EOF > .test.c
- main()
- {
- (void) gethostname();
- }
- EOF
-
- cat << EOF > .hostname
- cc .test.c
- EOF
-
- sh .hostname > .log 2>& 1
-
- if [ "`wc -l .log`" -eq "0" ]
- then
- echo "You have the 'gethostname()' system call..."
- else
- echo "s/\/\*\* #define NEED_GETHOSTNAME \*\*\//#define NEED_GETHOSTNAME/" \
- >> $SED1
- fi
-
- $rm -f a.out .test.c .hostname .log
-
- # next let's see if we have long variable names...
-
- cat << EOF > .test.c
- main()
- {
- int this_is_a_long_variable;
-
- (void) this_is_a_long_variable_routine_name();
-
- }
- this_is_a_long_variable_routine_name() { }
- EOF
-
- cat << EOF > .varnames
- cc .test.c
- EOF
-
- sh .varnames > .log 2>& 1
-
- if [ "`wc -l .log`" -eq "0" ]
- then
- echo "You have long variable names. Well done!!!!!"
- else
- echo "How embarassing. Your C compiler doesn't support long variables..."
- echo "s/\/\*\* #define SHORTNAMES \*\*\//#define SHORTNAMES/" \
- >> $SED1
- fi
-
- $rm -f a.out .test.c .varname .log
-
- cat << THE_END
-
- When given a machine that you talk to directly, should the 'pathalias' route to
- THE_END
-
- answer="no"
- echo $nflag "the machine be used instead [no] ? " $cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" ]
- then
- echo \
- "s/#define LOOK_CLOSE_AFTER_SEARCH/\/** #define LOOK_CLOSE_AFTER_SEARCH **\//" \
- >> $SED1
- fi
-
- answer="yes"
- echo " "
- echo $nflag "Is the preferred address notation 'user@host' [yes] ?" $cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" -a "$answer" != "" ]
- then
- echo \
- "s/#define INTERNET_ADDRESS_FORMAT/\/** #define INTERNET_ADDRESS_FORMAT **\//" \
- >> $SED1
- fi
-
- echo " "
- answer="yes"
- echo $nflag "Am I going to be running as a setgid program [yes] ? "$cflag
- read answer
-
- if [ "$answer" != "y" -a "$answer" != "yes" -a "$answer" != "" ]
- then
- echo answer is currently equal to \"$answer\"
- echo \
- "s/#define SAVE_GROUP_MAILBOX_ID/\/** #define SAVE_GROUP_MAILBOX_ID **\//" \
- >> $SED1
- fi
-
- cat << THE_END
-
-
- For any of the questions after this point, you can press RETURN if the
- questions doesn't apply, or there's no reasonable answer...
-
- THE_END
-
- if [ ! -f /usr/lib/nmail.paths ]
- then
- echo $nflag "Where does the output of pathalias live ? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/usr/lib/nmail.paths^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -f /usr/lib/domains ]
- then
- echo $nflag "Where does the 'domains' file live ? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/usr/lib/domains^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -f /usr/lib/uucp/L.sys ]
- then
- echo $nflag "Where does the 'L.sys' file live ? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/usr/lib/uucp/L.sys^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -d /tmp ]
- then
- echo $nflag "/tmp isn't a directory! What should I use?? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/tmp^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -f /usr/ucb/vi -a "$os_name" = "BSD" ]
- then
- echo $nflag "I can't find the 'vi' editor! Where is it? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/usr/ucb/vi^$answer^" >> $SED1
- fi
- elif [ ! -f /usr/bin/vi -a "$os_name" = "" ]
- then
- echo $nflag \
- "I can't find the 'vi' editor! Where is it? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/usr/bin/vi^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -d /usr/spool/mail -a "$os_name" = "BSD" ]
- then
- echo $nflag "I can't find your inbound mail directory! Where is it? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/usr/spool/mail^$answer^" >> $SED1
- fi
- elif [ ! -d /usr/mail -a "$os_name" = "" ]
- then
- echo $nflag "I can't find your inbound mail directory! Where is it? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/usr/mail^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -f /bin/rm ]
- then
- echo $nflag "Where's the 'rm' program? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/bin/rm^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -f /bin/cat ]
- then
- echo $nflag "Where's the 'cat' program? " $cflag
- read answer
-
- if [ "$answer" != "" ]
- then
- echo "s^/bin/rm^$answer^" >> $SED1
- fi
- fi
-
- if [ ! -f /dev/rct ]
- then
- if [ ! -f /dev/rmt ]
- then
- echo $nflag "What's the name of your remote-tape unit? " $cflag
- read answer
-
- if [ "$answer" = "" ]
- then
- echo "s^>tapeunit<^unknown-remote-tape-unit^" >> $SED2
- else
- if [ ! -f $answer ]
- then
- if [ -f /dev/$answer ]
- then
- echo "s^>tapeunit<^/dev/$answer^" >> $SED2
- else
- echo \
- "I can't find either $answer or /dev/$answer. I'll set it to junk"
- echo "s^>tapeunit<^unknown-remote-tape-unit^" >> $SED2
- fi
- else
- echo "s^>tapeunit<^$answer^" >> $SED2
- fi
- fi
- else
- echo "s^>tapeunit<^/dev/rmt^" >> $SED2
- fi
- else
- echo "s^>tapeunit<^/dev/rct^" >> $SED2
- fi
-
- if [ ! -d /usr/local/bin ]
- then
- echo $nflag "Where do you want the system software installed? " $cflag
- read answer
-
- if [ "$answer" = "" ]
- then
- echo "s^>dest-dir<^unknown-destination-directory^" >> $SED2
- else
- if [ -d $answer ]
- then
- echo "s^>dest-dir<^$answer^" >> $SED2
- else
- echo "I don't know what you're talking about. I'll set it to junk"
- echo "s^>dest-dir<^unknown-destination-directory^" >> $SED2
- fi
- fi
- else
- echo "s^>dest-dir<^/usr/local/bin^" >> $SED2
- fi
-
- if [ ! -f /usr/bin/troff ]
- then
- if [ ! -f /usr/local/bin/troff ]
- then
- if [ ! -f /usr/contrib/bin/troff ]
- then
- if [ ! -f /usr/ucb/troff ]
- then
- if [ ! -f /bin/troff ]
- then
- echo $nflag "Where does the 'troff' program live? " $cflag
- read answer
-
- if [ "$answer" = "" ]
- then
- echo "s/>troff</nroff/" >> $SED2
- else
- if [ -f $answer ]
- then
- echo "s^>troff<^$answer^" >> $SED2
- troff=$answer
- else
- echo "Still can't find it. I'll set it to \"nroff\" instead."
- echo "s/>troff</nroff/" >> $SED2
- fi
- fi
- else
- echo "s^>troff<^/bin/troff^" >> $SED2
- troff=/bin/troff
- fi
- else
- echo "s^>troff<^/usr/ucb/troff^" >> $SED2
- troff=/usr/ucb/troff
- fi
- else
- echo "s^>troff<^/usr/contrib/bin/troff^" >> $SED2
- troff=/usr/contribbin/troff
- fi
- else
- echo "s^>troff<^/usr/local/bin/troff^" >> $SED2
- troff=/usr/local/bin/troff
- fi
- else
- echo "s^>troff<^/usr/bin/troff^" >> $SED2
- troff=/usr/bin/troff
- fi
-
- # phew!
-
- troffdir=`dirname $troff`
-
- if [ -f $troffdir/tbl ]
- then
- echo "s^>tbl<^$troffdir/tbl^" >> $SED2
- else
- echo $nflag "Where does the 'tbl' program live? " $cflag
- read answer
-
- if [ "$answer" = "" ]
- then
- echo "s^>tbl<^cat^" >> $SED2
- elif [ -f $answer ]
- then
- echo "s^>tbl<^$answer^" >> $SED2
- else
- echo "I can't find that either. I'll just set it to junk..."
- echo "s^>tbl<^cat^" >> $SED2
- fi
- fi
-
- if [ -f /bin/cc ]
- then
- echo "s^>cc<^/bin/cc^" >> $SED2
- else
- echo $nflag "Where does the 'C' compiler live? " $cflag
- read answer
-
- if [ "$answer" = "" ]
- then
- cat << THE_END
-
- I hope you realize that without a "C" compiler there's no point in doing any
- of this. If we can't compile anything then this is just so much disk filler.
-
- In fact, thinking about it, let's just quit right now.
-
- THE_END
-
- exit 1
- fi
-
- if [ -f $answer ]
- then
- echo "s^>cc<^$answer^" >> $SED2
- else
- cat << THE_END
-
- I couldn't find what you specified, pal. I hope you realize that without a
- "C" compiler there's no point in doing any of this. If we can't compile
- anything then this system is just so much disk filler.
-
- In fact, thinking about it, let's just quit right now.
-
- THE_END
- exit 1
- fi
- fi
-
- echo "s^>rm<^$rm -f^" >> $SED2
-
- if [ -f /bin/mv ]
- then
- echo "s^>mv<^/bin/mv -f^" >> $SED2
- else
- echo "s^>mv<^mv -f^" >> $SED2
- fi
-
- if [ -f /bin/cp ]
- then
- echo "s^>cp<^/bin/cp^" >> $SED2
- else
- echo "s^>cp<^cp^" >> $SED2
- fi
-
- cat << END
-
- That's it. Just have to do some patching up and such...hang loose for a
- minute or two, please...
-
- END
-
- # process the three Makefiles accordingly...
-
- echo "1 - processing the file \"Makefile\"..."
- cat Makefile.mstr | sed -f $SED2 > Makefile
-
- echo "2 - processing the file \"src/Makefile\"..."
- cat src/Makefile.mstr | sed -f $SED2 > src/Makefile
-
- echo "3 - processing the file \"utils/Makefile\"..."
- cat utils/Makefile.mstr | sed -f $SED2 > utils/Makefile
-
- # then filter the sysdefs file through the sed script we've created!
-
- echo "Finally, processing the file \"hdrs/sysdefs.h\"..."
-
- if [ -f hdrs/sysdefs.h ]
- then
- mv hdrs/sysdefs.h hdrs/sysdefs.old
- fi
-
- cat hdrs/sysdefs.master | sed -f $SED1 > hdrs/sysdefs.h
-
- echo Done\!
-
- $rm -f $SED1 $SED2
- exit 0
- END_OF_FILE
-
- chars=`cat Configure.sh | wc -c`
-
- if [ $chars -ne 19263 ]
- then
- echo File damaged in transit...should be 19263 bytes, is $chars instead
- echo I suggest you check it closely...
- fi
-
- #---------------------------------
- # File Elm/Makefile.mstr is new!
-
- echo File Elm/Makefile.mstr is new - extracting...
- if [ -f Makefile.mstr ]
- then
- echo File \'Makefile.mstr\' is new, but you already have something called that\!
- echo I\'m going to move your file to \'Makefile.mstr.old\'...
- /bin/mv -f Makefile.mstr Makefile.mstr.old
- else
- echo Extracting new file \'Makefile.mstr\'
- fi
-
- cat > Makefile.mstr << 'END_OF_FILE'
- #
- # Makefile for the entire ELM mail system
- #
- # (C) Copyright 1986, Dave Taylor
- #
- # Last modification: July 14th, 1986
-
- SHELL=/bin/sh
-
- #########################
- #
- # The following entries need to be customized for the local site:
- # The first is the address of the data-cassette drive to allow
- # easy tape copies to be made, and the second is the final location
- # that all the software should be installed in when 'make install'
- # is run.
- #
- #########################
-
- TAPE= >tapeunit<
- DEST= >dest-dir<
-
- LIB= /usr/local/lib
- MAN= /usr/man/man1
- CATMAN= /usr/man/cat1
- SHAR= /usr/local/bin/shar -s 60000
-
- # See the Configuration Guide for further information on this stuff;
- #
- # if on a Berkeley system:
- # DEFINE = -DBSD
- # LIB2 = -lcurses
- # else if on a UTS system:
- # DEFINE = -DUTS
- # LIB2 = -la
- # else if on a Sun system:
- # DEFINE = "-DBSD -DSUN"
- # LIB2 = -lcurses
- # else if on a Pyramid system:
- # DEFINE = "-DBSD -DNO_VAR_ARGS"
- # LIB2 = -lcurses
- # otherwise;
-
- DEFINE = >os-define<
- LIB2 = >lib2<
-
- # If you're on ACSnet (Australia) you'll want to define
- # the following;
-
- # DEFINE="${DEFINE} -DACSNET"
-
- #########################
-
- LIBS= -ltermcap
- CFLAGS= -O
- CC= >cc<
- RM= >rm<
- MV= >mv<
- CP= >cp<
-
- # if you want to use "nroff", change this...
-
- FORMATTER = >troff<
- TBL = >tbl<
-
- DOCS= Config.guide Users.guide Ref.guide Alias.guide elm.1 from.1 \
- printmail.1 newalias.1 newmail.1 answer.1 messages.1 \
- grabalias.1 fastmail.1 readmsg.1 autoreply.1 wnewmail.1 \
- trim-headers.1
-
- UTILSRC= utils/answer.c utils/arepdaemon.c utils/autoreply.c \
- utils/fastmail.c utils/from.c utils/newalias.c \
- utils/newmail.c utils/printmail.c utils/readmsg.c utils/wnewmail.c \
- utils/trim-headers
-
- ELMSRC= src/addr_utils.c src/alias.c src/aliasdb.c src/aliaslib.c \
- src/args.c src/bounceback.c src/connect_to.c src/curses.c \
- src/date.c src/delete.c src/domains.c src/edit.c src/encode.c \
- src/errno.c src/file.c src/file_utils.c src/fileio.c src/hdrconfg.c \
- src/help.c src/initialize.c src/input_utils.c src/leavembox.c \
- src/mailmsg1.c src/mailmsg2.c src/mailtime.c src/mkhdrs.c \
- src/elm.c src/newmbox.c src/notesfile.c src/opt_utils.c \
- src/output_utils.c src/pattern.c src/quit.c src/read_rc.c \
- src/remail.c src/reply.c src/return_addr.c src/savecopy.c \
- src/screen.c src/showmsg.c src/signals.c src/softkeys.c \
- src/strings.c src/syscall.c src/utils.c src/validname.c \
- src/calendar.c src/sort.c src/getopt.c src/string2.c \
- src/builtin.c
-
- ################
-
- all: bin/elm utils
- @echo Everything is up to date!
-
- documentation: doc/Users.fmtd doc/Ref.fmtd doc/Config.fmtd doc/Alias.fmtd
-
- doc/Users.fmtd: doc/Users.guide
- ${TBL} doc/Users.guide | ${FORMATTER} -mm > doc/Users.fmtd
-
- doc/Ref.fmtd: doc/Ref.guide
- ${FORMATTER} -mm doc/Ref.guide > doc/Ref.fmtd
-
- doc/Config.fmtd: doc/Config.guide
- ${TBL} doc/Config.guide | ${FORMATTER} -mm > doc/Config.fmtd
-
- doc/Alias.fmtd: doc/Alias.guide
- ${FORMATTER} -mm doc/Alias.guide > doc/Alias.fmtd
-
- bin/elm: ${ELMSRC}
- cd src;make DEFINE=${DEFINE} LIB2=${LIB2} ../bin/elm; cd ..
-
- bin/utils: ${UTILSRC}
- cd utils; make DEFINE=${DEFINE} LIBS=${LIB2} all; cd ..
- @touch bin/utils
-
- install: all
- ${CP} bin/elm ${DEST}/elm
- ${CP} bin/from ${DEST}/from
- ${CP} bin/newalias ${DEST}/newalias
- ${CP} bin/printmail ${DEST}/printmail
- ${CP} bin/fastmail ${DEST}/fastmail
- ${CP} bin/readmsg ${DEST}/readmsg
- ${CP} bin/newmail ${DEST}/newmail
- ${CP} bin/wnewmail ${DEST}/wnewmail
- ${CP} bin/checkalias ${DEST}/checkalias
- ${CP} bin/messages ${DEST}/messages
- ${CP} bin/trim-headers ${DEST}/trim-headers
- ${CP} bin/arepdaemon ${DEST}/arepdaemon
- ${CP} bin/autoreply ${DEST}/autoreply
- ${RM} ${CATMAN}/elm.1 ${CATMAN}/from.1 \
- ${CATMAN}/newalias.1 ${CATMAN}/printmail.1 \
- ${CATMAN}/fastmail.1 ${CATMAN}/elm.1 \
- ${CATMAN}/readmsg.1 ${CATMAN}/answer.1 \
- ${CATMAN}/newmail.1 ${CATMAN}/checkalias.1 \
- ${CATMAN}/autoreply.1 ${CATMAN}/wnewmail.1 \
- ${CATMAN}/messages.1 ${CATMAN}/trim-headers.1
- ${CP} doc/elm.1 ${MAN}/elm.1
- ${CP} doc/from.1 ${MAN}/from.1
- ${CP} doc/newalias.1 ${MAN}/newalias.1
- ${CP} doc/printmail.1 ${MAN}/printmail.1
- ${CP} doc/fastmail.1 ${MAN}/fastmail.1
- ${CP} doc/checkalias.1 ${MAN}/checkalias.1
- ${CP} doc/messages.1 ${MAN}/messages.1
- ${CP} doc/trim-headers.1 ${MAN}/trim-headers.1
- ${CP} doc/autoreply.1 ${MAN}/autoreply.1
- ${CP} doc/answer.1 ${MAN}/answer.1
- ${CP} doc/readmsg.1 ${MAN}/readmsg.1
- ${CP} doc/newmail.1 ${MAN}/newmail.1
- ${CP} doc/wnewmail.1 ${MAN}/wnewmail.1
- ${CP} doc/helpfile ${LIB}/elm-help.main
- chmod a+rx ${DEST}/from ${DEST}/newalias \
- ${DEST}/printmail ${DEST}/fastmail \
- ${DEST}/readmsg ${DEST}/trim-headers \
- ${DEST}/checkalias ${DEST}/autoreply \
- ${DEST}/newmail ${DEST}/wnewmail ${DEST}/messages
- chgrp mail ${DEST}/elm
- chmod 2755 ${DEST}/elm
- @echo Done with installation.
-
- rmt-install: remote-defined
- @echo " "
- @echo Warning: This assumes "install" has been done on the
- @echo " remote machine. If this is not the case you"
- @echo " better hit BREAK quickly!"
- @echo " "
- ${CP} ${REMOTE}${DEST}/elm ${DEST}/elm
- ${CP} ${REMOTE}${DEST}/from ${DEST}/from
- ${CP} ${REMOTE}${DEST}/newalias ${DEST}/newalias
- ${CP} ${REMOTE}${DEST}/printmail ${DEST}/printmail
- ${CP} ${REMOTE}${DEST}/fastmail ${DEST}/fastmail
- ${CP} ${REMOTE}${DEST}/readmsg ${DEST}/readmsg
- ${CP} ${REMOTE}${DEST}/wnewmail ${DEST}/wnewmail
- ${CP} ${REMOTE}${DEST}/newmail ${DEST}/newmail
- ${CP} ${REMOTE}${DEST}/checkalias ${DEST}/checkalias
- ${CP} ${REMOTE}${DEST}/messages ${DEST}/messages
- ${CP} ${REMOTE}${DEST}/arepdaemon ${DEST}/arepdaemon
- ${CP} ${REMOTE}${DEST}/autoreply ${DEST}/autoreply
- ${RM} ${CATMAN}/elm.1 \
- ${CATMAN}/from.1 \
- ${CATMAN}/newalias.1 \
- ${CATMAN}/printmail.1 \
- ${CATMAN}/fastmail.1 \
- ${CATMAN}/checkalias.1 \
- ${CATMAN}/autoreply.1 \
- ${CATMAN}/readmsg.1 \
- ${CATMAN}/answer.1 \
- ${CATMAN}/newmail.1 \
- ${CATMAN}/wnewmail.1 \
- ${CATMAN}/elm.1
- ${CP} ${REMOTE}${MAN}/elm.1 ${MAN}/elm.1
- ${CP} ${REMOTE}${MAN}/from.1 ${MAN}/from.1
- ${CP} ${REMOTE}${MAN}/newalias.1 ${MAN}/newalias.1
- ${CP} ${REMOTE}${MAN}/printmail.1 ${MAN}/printmail.1
- ${CP} ${REMOTE}${MAN}/fastmail.1 ${MAN}/fastmail.1
- ${CP} ${REMOTE}${MAN}/checkalias.1 ${MAN}/checkalias.1
- ${CP} ${REMOTE}${MAN}/autoreply.1 ${MAN}/autoreply.1
- ${CP} ${REMOTE}${MAN}/readmsg.1 ${MAN}/readmsg.1
- ${CP} ${REMOTE}${MAN}/answer.1 ${MAN}/answer.1
- ${CP} ${REMOTE}${MAN}/wnewmail.1 ${MAN}/wnewmail.1
- ${CP} ${REMOTE}${MAN}/newmail.1 ${MAN}/newmail.1
- ${CP} ${REMOTE}${LIB}/elm-help.main ${LIB}/elm-help.main
- chmod a+rx ${DEST}/from ${DEST}/newalias ${DEST}/printmail \
- ${DEST}/fastmail ${DEST}/readmsg \
- ${DEST}/checkalias ${DEST}/autoreply ${DEST}/wnewmail \
- ${DEST}/newmail ${DEST}/messages
- chgrp mail ${DEST}/elm
- chmod 2755 ${DEST}/elm
- @echo everything is installed based on files from ${REMOTE}
-
- source:
- tar cvf ${TAPE} bin/makelisting utils/*.c src/*.c doc/* hdrs/* \
- Instructions Makefile UNIQ_SYMS README utils/Makefile src/Makefile \
- test/* utils/*.awk CHANGES Overview
-
- # Note that the production for SHAR assumes a pretty snazzy shar program
- # that can break down the output into a number of files as needed...
- # The current threshold is 60,000 bytes per file, for email/netnews
-
- shar:
- ${SHAR} *
-
- lint:
- lint ${UTILSRC} > lint.out
-
- listing:
- @echo listing all source files
- @/bin/echo \\f > LISTING
- @echo adding file 'README'...
- @cat README >> LISTING
- @/bin/echo \\f >> LISTING
- @echo adding file 'Instructions...
- @cat Instructions >> LISTING
- @/bin/echo \\f >> LISTING
- @echo adding file 'Makefile'...
- @cat Makefile >> LISTING
- @bin/makelisting Makefile ${UTILSRC} src/Makefile src/*.c hdrs/*.h
- @echo LISTING generated.
-
- elm-listing:
- @echo listing just the ELM system source files
- @echo ' ' > src/LISTING
- @cd src ; make listing ; cd ..
- @echo LISTING generated \(in directory /src\).
-
- clean:
- @cd src ; make clean ; cd ..
- @cd utils; make clean ; cd ..
- @echo All spurious files removed
-
- elm: bin/elm
- utils: bin/utils
- utils/checkalias:
- utils/messages:
- doc/Users.guide:
- doc/Ref.guide:
- doc/Alias.guide:
- doc/Config.guide:
-
- remote-defined:
- @if ( "${REMOTE}" == "" ) then; \
- echo " " ; \
- echo "You need to define 'REMOTE' as the remote file system" ; \
- echo "for this particular command. The easiest way to do " ; \
- echo "this is to type:" ;\
- echo " make -f <makefile> REMOTE=<remote file system> rmt-install" ; \
- echo " " ; \
- endif
- @if ( "${REMOTE}" == "" ) exit 1
- END_OF_FILE
-
- chars=`cat Makefile.mstr | wc -c`
-
- if [ $chars -ne 8850 ]
- then
- echo File damaged in transit...should be 8850 bytes, is $chars instead
- echo I suggest you check it closely...
- fi
-
-
- echo done with autodiff, part 2
- exit 0
-
- \SHAR_EOF
-