From ceb3507a8fca872770b3dcd7e5c5b36179ab95b0 Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Fri, 30 May 2008 12:42:47 -0700 Subject: Import dist_3.5-236.orig.tar.gz [dgit import orig dist_3.5-236.orig.tar.gz] --- mcon/U/MailAuthor.U | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 mcon/U/MailAuthor.U (limited to 'mcon/U/MailAuthor.U') diff --git a/mcon/U/MailAuthor.U b/mcon/U/MailAuthor.U new file mode 100644 index 0000000..5b93cde --- /dev/null +++ b/mcon/U/MailAuthor.U @@ -0,0 +1,192 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?RCS: Original Author: Graham Stoney +?RCS: +?RCS: $Log: MailAuthor.U,v $ +?RCS: Revision 3.0.1.5 1997/02/28 15:04:41 ram +?RCS: patch61: added support for src.U +?RCS: +?RCS: Revision 3.0.1.4 1994/08/29 16:05:09 ram +?RCS: patch32: avoid message sending if they said no previously +?RCS: +?RCS: Revision 3.0.1.3 1993/10/16 13:47:30 ram +?RCS: patch12: now makes sure user-specified address is in Internet format +?RCS: +?RCS: Revision 3.0.1.2 1993/09/13 15:48:49 ram +?RCS: patch10: reverted to original intent by the Author himself +?RCS: +?RCS: Revision 3.0.1.1 1993/08/27 14:38:38 ram +?RCS: patch7: now prompts user for its e-mail address +?RCS: patch7: no longer silent when mail has been sent +?RCS: +?RCS: Revision 3.0 1993/08/18 12:05:06 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?RCS: +?X: +?X: This unit asks the user to please send a message to the author. +?X: To force inclusion of this unit, you must add it's name to the +?X: dependencies on the MAKE line in your private copy of End.U. +?X: This allows a smart mailagent program to automatically let users know +?X: when their package is out of date, and to allow users to be notified of +?X: any future patches. +?X: +?MAKE:MailAuthor mailpatches notifypatches usermail: test cat mailer \ + package Myread patchlevel baserev rm rsrc Oldconfig Configdir +?MAKE: -pick wipe $@ %< +?S:mailpatches: +?S: Indicates whether the user would like future patches to be mailed +?S: directly to them. +?S:. +?S:notifypatches: +?S: Indicates whether the user would like notification of future patches +?S: mailed to them. +?S:. +?S:usermail: +?S: This variable is used internally by Configure to keep track of the +?S: user e-mail address, where notifications or patches should be sent. +?S: A '-' value means the return address will be extracted by parsing +?S: the mail headers. +?S:. +?T:opt mailpatches notifypatches atsh status +: notify author that his package is used +if $test -f ../.config/mailauthor && + cmp $rsrc/patchlevel.h ../.config/mailauthor >/dev/null 2>&1 +then + status="say that you're using $package"; + case "$mailpatches" in + true) status='have patches mailed to you as they are issued';; + esac + case "$notifypatches" in + true) status='be notified when new patches are issued';; + esac + $cat <) mail to +$status. If you wish, you may modify +your previous request by sending a new mail with different options. + +EOM + rp='Should I send a status update to ?' + dflt=n +else + $cat <..." >&4 +?X: Bizarre hack here. We can't just put @SH in the hereis lines below, because +?X: metaconfig will interpret it as a command, and there's no quoting mechanism. +?X: Do it via a variable instead. + atsh='@SH' + $mailer </dev/null 2>&1 +Subject: Command +Precedence: junk +To: + +$atsh package $usermail $package $baserev $patchlevel$opt +EOM + $rm -f ../.config/mailauthor ../.config/nomail + cp $rsrc/patchlevel.h ../.config/mailauthor + ;; +*) + case "$dflt" in + "y") + echo "Oh well, maybe next time." + cp /dev/null ../.config/nomail + ;; + esac + ;; +esac + -- cgit v1.2.3