#! /bin/sh
# execit.link - use after make-ing execit to link the MH versions automatically
incfile=execit.include
if [ ! -r $incfile ]
then
echo "`basename $0`: can't read '$incfile'; quitting." 1>&2
exit 1
fi
outdir=${HOME?}/.bin
# EACH LINE OF $incfile HAS LINK NAME AND PROGRAM, LIKE THIS:
# "thanks", "/usr/local/mh/repl",
# USE sed TO GRAB FIRST WORD ON EACH LINE, WITHOUT THE QUOTES.
for link in `sed 's/^[^"]*"\([^"][^"]*\)".*/\1/' $incfile`
do
rm -f $outdir/$link
ln $outdir/execit $outdir/$link
done
exit 0
[Table of Contents] [Index] [Return to Explanation (The execit Programs)] [The execit.c C Program] [The execit.include File] [The execit Makefile]
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.
Suggestions are welcome: Jerry Peek <jerry@ora.com>