home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume26 / kit / pch15 < prev    next >
Encoding:
Text File  |  1993-05-04  |  41.3 KB  |  1,458 lines

  1. Newsgroups: comp.sources.unix
  2. From: ram@acri.fr (Raphael Manfredi)
  3. Subject: v26i220: kit - the ultimate mailing kit, Patch15
  4. Sender: unix-sources-moderator@efficacy.home.vix.com
  5. Approved: WhoAmI@efficacy.home.vix.com
  6.  
  7. Submitted-By: ram@acri.fr (Raphael Manfredi)
  8. Posting-Number: Volume 26, Issue 220
  9. Archive-Name: kit/pch15
  10.  
  11. [The latest patch for kit version 2.0 is #28.]
  12.  
  13. System: kit version 2.0
  14. Patch #: 15
  15. Priority: LOW
  16. Subject: fixed a typo in Configure
  17. Subject: acknowledgment section in README updated
  18. Subject: now creates directories before installing
  19. Subject: added support for -a option
  20. Subject: stamping now includes user and host infos
  21. Subject: error checking improved
  22. Subject: kit will no longer remove existing kit parts
  23. Subject: added the bulk Precedence and X-Mailer headers
  24. Subject: fixed incorrect help message regarding -l
  25. Subject: changed verbose messages for consistency with other scripts
  26. Subject: minikit now extracted via a .SH file
  27. Subject: added acknowledgment support
  28. Subject: replaced space indentation with tabs
  29. Subject: documents the new -a option
  30. Subject: older kits will not honor -a or -M (new paragraph in BUGS)
  31. Subject: determination of user and host no longer uses a sub-shell
  32. Date: Mon Apr 20 17:45:17 PDT 1992
  33. From: Raphael Manfredi <ram@eiffel.com>
  34.  
  35. Description:
  36.     All the Makefiles now create directories before installing. Apparently
  37.     this caused some problems with peculiar installations. This bug and
  38.     was reported by Dr Robert M. Cothren <rim@marvin.ri.ccf.org>. Thank you!
  39.  
  40.     Minikit is now created via a .SH file, because it carries patchlevel
  41.     and version informations.
  42.  
  43.     Stamping of kit files now includes user and host infos, like usual
  44.     shell archivers do.
  45.  
  46.     Error checking in kit improved, as suggested by Christian Bertin
  47.     <bertin@acri.fr>. Kit will now abort with an error message if the
  48.     current directory is not writable and will force you to use -d.
  49.  
  50.     Kit will no longer remove existing kit parts.
  51.  
  52.     All the mails sent by mailkit now carry a 'Precedence: bulk' and
  53.     an X-Mailer headers. The former will avoid vacation-like messages
  54.     and the latter helps debugging.
  55.  
  56.     Fixed incorrect help message regarding -l option in mailkit. The -l
  57.     option directs mailkit to include addresses from a specified file,
  58.     but any address included on the command line will still be honored.
  59.  
  60.     Changed verbose messages in mailkit for consistency with other scripts.
  61.  
  62.     Added acknowledgment support. This is the most "flashy" change since
  63.     the last patch. By adding a '-a <address>' option on the kit command
  64.     line, you direct the remote 'unkit' to send you an acknowledgment when
  65.     the archive is successfully unkit'ed. However, since this is a new
  66.     feature, older kits will not honor -a (see new paragraph in BUGS).
  67.     This means you will not get any acknowledgments until your party
  68.     updates to kit 2.0 PL15. The acknowledgment is mentionned in the
  69.     leading part of each kit files. There is no way to suppress its
  70.     sending (other than hitting ^C), but is there a need for that?
  71.  
  72.  
  73. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your kit source
  74.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  75.     If you don't have the patch program, apply the following by hand,
  76.     or get patch (version 2.0, latest patchlevel).
  77.  
  78.     After patching:
  79.         rm kit/minikit    # Replaced by kit/minikit.SH
  80.         Configure -d
  81.         make
  82.         make install
  83.  
  84.     If patch indicates that patchlevel is the wrong version, you may need
  85.     to apply one or more previous patches, or the patch may already
  86.     have been applied.  See the patchlevel.h file to find out what has or
  87.     has not been applied.  In any event, don't continue with the patch.
  88.  
  89.     If you are missing previous patches they can be obtained from me:
  90.  
  91.         Raphael Manfredi <ram@eiffel.com>
  92.  
  93.     If you send a mail message of the following form it will greatly speed
  94.     processing:
  95.  
  96.         Subject: Command
  97.         @SH mailpatch PATH kit 2.0 LIST
  98.                ^ note the c
  99.  
  100.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  101.     or in bang notation from some well-known host, and LIST is the number
  102.     of one or more patches you need, separated by spaces, commas, and/or
  103.     hyphens.  Saying 35- says everything from 35 to the end.
  104.  
  105.     To get some more detailed instructions, send me the following mail:
  106.  
  107.         Subject: Command
  108.         @SH mailhelp PATH
  109.  
  110.  
  111. Index: patchlevel.h
  112. Prereq: 14
  113. 2c2
  114. < #define PATCHLEVEL 14
  115. ---
  116. > #define PATCHLEVEL 15
  117.  
  118. Index: kit/kit.SH
  119. Prereq: 2.0.1.8
  120. *** kit/kit.SH.old    Mon Apr 20 17:44:29 1992
  121. --- kit/kit.SH    Mon Apr 20 17:44:30 1992
  122. ***************
  123. *** 26,34 ****
  124.   !GROK!THIS!
  125.   $spitshell >>kit <<'!NO!SUBS!'
  126.   
  127. ! # $Id: kit.SH,v 2.0.1.8 92/01/13 14:13:59 ram Exp $
  128.   #
  129.   # $Log:    kit.SH,v $
  130.   # Revision 2.0.1.8  92/01/13  14:13:59  ram
  131.   # patch13: fixed the option parsing code
  132.   # 
  133. --- 26,40 ----
  134.   !GROK!THIS!
  135.   $spitshell >>kit <<'!NO!SUBS!'
  136.   
  137. ! # $Id: kit.SH,v 2.0.1.9 92/04/20 17:35:03 ram Exp $
  138.   #
  139.   # $Log:    kit.SH,v $
  140. + # Revision 2.0.1.9  92/04/20  17:35:03  ram
  141. + # patch15: added support for -a option
  142. + # patch15: stamping now includes user and host infos
  143. + # patch15: error checking improved
  144. + # patch15: kit will no longer remove existing kit parts
  145. + # 
  146.   # Revision 2.0.1.8  92/01/13  14:13:59  ram
  147.   # patch13: fixed the option parsing code
  148.   # 
  149. ***************
  150. *** 74,81 ****
  151.   tmpdir="."                    # Temporary directory used
  152.   partname="Kit"                # Default part name used
  153.   minikit=''                    # Do not include minikit
  154. ! mininame=''                    # File where minikit's name is stored
  155. ! instruct=''                    # Instrucutions for minikit usage
  156.   
  157.   # Mailkit options
  158.   mailopt=""
  159. --- 80,89 ----
  160.   tmpdir="."                    # Temporary directory used
  161.   partname="Kit"                # Default part name used
  162.   minikit=''                    # Do not include minikit
  163. ! others=''                    # Other files to be included
  164. ! instruct=''                    # Added instrucutions (minikit / acknowledgment)
  165. ! ack=''                        # Acknowledgment file
  166. ! ackto=''                    # Acknowledgment address
  167.   
  168.   # Mailkit options
  169.   mailopt=""
  170. ***************
  171. *** 87,94 ****
  172.   
  173.   # Old Bourne shells do not have functions
  174.   usage='
  175. ! echo "Usage: kit [-BEFHMVXefhpx] [-d dir] [-k key] [-m address] [-n basename]";
  176. ! echo " "" "" "" "" "" "" [-l file] [-s name] dirs | files";
  177.   echo " "" -B : use btoa encoding (default).";
  178.   echo " "" -E : edit instructions for part #0 (passed to mailkit).";
  179.   echo " "" -F : feed instructions from stdin to part #0 (passed to mailkit).";
  180. --- 95,102 ----
  181.   
  182.   # Old Bourne shells do not have functions
  183.   usage='
  184. ! echo "Usage: kit [-BEFHMVXefhpx] [-a address] [-d dir] [-k key] [-m address]";
  185. ! echo " "" "" "" "" "" "" [-n basename] [-l file] [-s name] dirs | files";
  186.   echo " "" -B : use btoa encoding (default).";
  187.   echo " "" -E : edit instructions for part #0 (passed to mailkit).";
  188.   echo " "" -F : feed instructions from stdin to part #0 (passed to mailkit).";
  189. ***************
  190. *** 96,101 ****
  191. --- 104,110 ----
  192.   echo " "" -M : include minikit in the distribution.";
  193.   echo " "" -V : print version and patch-level.";
  194.   echo " "" -X : use Electronic Code Block DES encryption.";
  195. + echo " "" -a : acknowledgment requested upon archive extraction.";
  196.   echo " "" -d : put temporary files in the specified directory.";
  197.   echo " "" -e : edit instructions to add in each part (passed to mailkit).";
  198.   echo " "" -f : feed instructions from stdin in each part (passed to mailkit).";
  199. ***************
  200. *** 140,145 ****
  201. --- 149,159 ----
  202.           mode="zec"
  203.           shift
  204.           ;;
  205. +     -a) ackto="$2"
  206. +         ack='zzz.ack'
  207. +         shift
  208. +         shift
  209. +         ;;
  210.       -d) tmpdir="$2"
  211.           shift
  212.           shift
  213. ***************
  214. *** 195,201 ****
  215.       eval $usage
  216.   fi
  217.   
  218. ! rm -f $tmpdir/$partname??            # Make sure no parts already exist
  219.   
  220.   # If DES is to be performed, do it before ASCII coding
  221.   case "$mode" in
  222. --- 209,233 ----
  223.       eval $usage
  224.   fi
  225.   
  226. ! # Check the writing permissions in the tmp directory. Also ifsome Kit parts are
  227. ! # detected, complain and abort.
  228. ! if test -w "$tmpdir" -a -d "$tmpdir"; then
  229. !     if test -f $tmpdir/${partname}01; then
  230. ! echo >&2 "kit: directory '$tmpdir' already holds a file named '${partname}01'."
  231. !         exit 1
  232. !     fi
  233. ! else
  234. !     if test -d "$tmpdir"; then
  235. !         echo >&2 "kit: you lack write permissions in the '$tmpdir' directory."
  236. !     else
  237. !         echo >&2 "kit: '$tmpdir' is not a directory."
  238. !     fi
  239. !     exit 1
  240. ! fi
  241. ! # Make sure no parts already exist. Due to the above check, existing parts will
  242. ! # be removed only if they are named with extensions from 02 to 99.
  243. ! rm -f $tmpdir/$partname??
  244.   
  245.   # If DES is to be performed, do it before ASCII coding
  246.   case "$mode" in
  247. ***************
  248. *** 204,209 ****
  249. --- 236,246 ----
  250.       coding="des $desopt | "$coding;;
  251.   esac
  252.   
  253. + # Subject is user-provided or the first file name is used
  254. + case "$subject" in
  255. + '') subject=$1
  256. + esac
  257.   # We have two encoding methods for binary datas:
  258.   # - hexencode: brute force (mogenix)
  259.   # - btoa: binary to ascii (ram)
  260. ***************
  261. *** 222,231 ****
  262.   
  263.   # In case we are interrupted
  264.   trap "rm -f $tmpfile; cd $tmpdir; rm -f $partname?? ${split_file}* \
  265. !     $minikit $partname??.$$; echo >&2 'Aborted.'; exit 1" 1 2 3 15
  266.   
  267.   # We have to use a tmp file to avoid des prompting while tar is running
  268.   tar cvf - $@ | compress -v > $tmpfile
  269.   
  270.   cd $tmpdir
  271.   
  272. --- 259,275 ----
  273.   
  274.   # In case we are interrupted
  275.   trap "rm -f $tmpfile; cd $tmpdir; rm -f $partname?? ${split_file}* \
  276. !     $others $partname??.$$; echo >&2 'Aborted.'; exit 1" 1 2 3 15
  277.   
  278.   # We have to use a tmp file to avoid des prompting while tar is running
  279.   tar cvf - $@ | compress -v > $tmpfile
  280. + case $? in
  281. + 0) break;;
  282. + *) echo >&2 "kit: archiving failed."
  283. +     rm -f $tmpfile
  284. +     exit 1
  285. +     ;;
  286. + esac
  287.   
  288.   cd $tmpdir
  289.   
  290. ***************
  291. *** 237,243 ****
  292.           # Name of the minikit program is passed along to unkit, so that the
  293.           # script may be removed when unkit is ran...
  294.           echo "$minikit" > zzz.minikit
  295. !         mininame=zzz.minikit
  296.           # Prepare instructions for later
  297.           instruct=">>
  298.   >> In case you do not have unkit, you may proceeed as follows:
  299. --- 281,287 ----
  300.           # Name of the minikit program is passed along to unkit, so that the
  301.           # script may be removed when unkit is ran...
  302.           echo "$minikit" > zzz.minikit
  303. !         others="zzz.minikit $minikit"
  304.           # Prepare instructions for later
  305.           instruct=">>
  306.   >> In case you do not have unkit, you may proceeed as follows:
  307. ***************
  308. *** 246,252 ****
  309.   >> - Run the '$minikit' program, and the kit will be extracted for you.
  310.   >>   If the extraction is successful, all the temporary files previously
  311.   >>   extracted will be removed, including $minikit.
  312.   "
  313.       else
  314.           echo >&2 "$0: cannot find minikit in $libdir"
  315. --- 290,295 ----
  316. ***************
  317. *** 254,275 ****
  318.       fi
  319.   fi
  320.   
  321.   # Check whether we can use cshar or not
  322.   if (makekit -v) >/dev/null 2>&1; then
  323. !     makekit="makekit -k100 -n $partname ${split_file}* $minikit $mininame"
  324.   else
  325. !     makekit="$libdir/makeshar -n $partname ${split_file}* $minikit $mininame"
  326.   fi
  327.   
  328.   echo "Coding with $coding"
  329.   # Beware: 'eval $coding < $tmpfile' is not portable
  330.   cat $tmpfile | eval $coding |
  331.   split -600 - $split_file &&
  332. ! eval $makekit &&
  333. ! rm ${split_file}* $minikit $mininame $tmpfile
  334. ! case "$subject" in
  335. ! '') subject=$1
  336.   esac
  337.   
  338.   # Stamp the files, stating they are kit files and not shell archives
  339. --- 297,340 ----
  340.       fi
  341.   fi
  342.   
  343. + # If acknowledgment is wanted, write address in zzz.ack and add this file to
  344. + # zzz.minikit to ensure its final removal by unkit.
  345. + if test "$ack"; then
  346. +     echo "$ackto" >> zzz.ack
  347. +     echo "$subject" >> zzz.subject
  348. +     echo "zzz.ack" >> zzz.minikit
  349. +     echo "zzz.subject" >> zzz.minikit
  350. +     others="$others zzz.subject zzz.ack"
  351. +     case "$others" in
  352. +     *zzz.minikit*);;
  353. +     *) others="$others zzz.minikit";;
  354. +     esac
  355. +     instruct="$instruct>>
  356. + >> An acknowledgment will be automatically sent by unkit upon successful
  357. + >> extraction to the following address: $ackto.
  358. + "
  359. + fi
  360.   # Check whether we can use cshar or not
  361.   if (makekit -v) >/dev/null 2>&1; then
  362. !     makekit="makekit -k100 -n $partname ${split_file}* $others"
  363.   else
  364. !     makekit="$libdir/makeshar -n $partname ${split_file}* $others"
  365.   fi
  366.   
  367.   echo "Coding with $coding"
  368.   # Beware: 'eval $coding < $tmpfile' is not portable
  369. + status=1
  370.   cat $tmpfile | eval $coding |
  371.   split -600 - $split_file &&
  372. ! eval $makekit && status=0
  373. ! rm ${split_file}* $others $tmpfile
  374. ! case "$status" in
  375. ! 0);;
  376. ! *) echo >&2 "kit: sharing failed."
  377. !     rm -f $tmpdir/$partname??
  378. !     exit 1
  379. !     ;;
  380.   esac
  381.   
  382.   # Stamp the files, stating they are kit files and not shell archives
  383. ***************
  384. *** 276,281 ****
  385. --- 341,348 ----
  386.   set X $partname??
  387.   shift
  388.   nfiles=$#
  389. + user=`(logname) 2>/dev/null || whoami`
  390. + host=`(uname -n) 2>/dev/null || hostname`
  391.   for file in $partname??
  392.   do
  393.       # Extract part number
  394. ***************
  395. *** 284,290 ****
  396.       part_num=`expr $part + 0`
  397.       # Write kit header stamp message
  398.       echo "Stamping kit $part_num..."
  399. !     genstamp=">> Generated by kit $version PL$pl on `date`"
  400.       if test $nfiles -gt 1; then
  401.           cat >$file.$$ <<EOH
  402.   >> This is a kit file (part #$part_num out of $nfiles). To unkit, save this message
  403. --- 351,357 ----
  404.       part_num=`expr $part + 0`
  405.       # Write kit header stamp message
  406.       echo "Stamping kit $part_num..."
  407. !     genstamp=">> Wrapped by $user@$host on `date` [kit $version PL$pl]"
  408.       if test $nfiles -gt 1; then
  409.           cat >$file.$$ <<EOH
  410.   >> This is a kit file (part #$part_num out of $nfiles). To unkit, save this message
  411.  
  412. Index: man/kit.SH
  413. Prereq: 2.0.1.7
  414. *** man/kit.SH.old    Mon Apr 20 17:44:56 1992
  415. --- man/kit.SH    Mon Apr 20 17:44:58 1992
  416. ***************
  417. *** 18,26 ****
  418.   .TH KIT $manext ram
  419.   ''' @(#) Manual page for mailing kit -- (c) ram July 1990
  420.   '''
  421. ! ''' $Id: kit.SH,v 2.0.1.7 92/01/13 14:21:42 ram Exp $
  422.   '''
  423.   ''' $Log:    kit.SH,v $
  424.   ''' Revision 2.0.1.7  92/01/13  14:21:42  ram
  425.   ''' patch13: the built-in unshar in unkit may now be used alone
  426.   ''' 
  427. --- 18,30 ----
  428.   .TH KIT $manext ram
  429.   ''' @(#) Manual page for mailing kit -- (c) ram July 1990
  430.   '''
  431. ! ''' $Id: kit.SH,v 2.0.1.8 92/04/20 17:42:36 ram Exp $
  432.   '''
  433.   ''' $Log:    kit.SH,v $
  434. + ''' Revision 2.0.1.8  92/04/20  17:42:36  ram
  435. + ''' patch15: documents the new -a option
  436. + ''' patch15: older kits will not honor -a or -M (new paragraph in BUGS)
  437. + ''' 
  438.   ''' Revision 2.0.1.7  92/01/13  14:21:42  ram
  439.   ''' patch13: the built-in unshar in unkit may now be used alone
  440.   ''' 
  441. ***************
  442. *** 58,64 ****
  443.   .SH NAME
  444.   kit, mailkit, unkit \- the ultimate mailing tools
  445.   .SH SYNOPSIS
  446. ! \fBkit\fR [ \fB\-EFHMBVXefhpx\fR ] [ \fB\-k\fI key\fR]
  447.   [ \fB\-d\fI dir\fR ] [ \fB\-m\fI address\fR ] [ \fB\-n\fI basename\fR ]
  448.   [ \fB\-l\fI file\fR ] [ \fB\-s\fI name\fR ] \fIdirectories\fR | \fIfiles\fR
  449.   .br
  450. --- 62,68 ----
  451.   .SH NAME
  452.   kit, mailkit, unkit \- the ultimate mailing tools
  453.   .SH SYNOPSIS
  454. ! \fBkit\fR [ \fB\-EFHMBVXefhpx\fR ] [ \fB\-a\fI address\fR] [ \fB\-k\fI key\fR]
  455.   [ \fB\-d\fI dir\fR ] [ \fB\-m\fI address\fR ] [ \fB\-n\fI basename\fR ]
  456.   [ \fB\-l\fI file\fR ] [ \fB\-s\fI name\fR ] \fIdirectories\fR | \fIfiles\fR
  457.   .br
  458. ***************
  459. *** 75,83 ****
  460.   (option \fB\-H\fR) or ASCII-encoded with \fIbtoa\fR(1)
  461.   (option \fB\-B\fR, which is used by default) before being shell-archived.
  462.   \fIKit\fR produces files that match "Kit*" regular expression.
  463. ! This default base name can be changed thanks to \fB\-n\fR option.
  464. ! On invocation, it removes all previously existing "Kit*" files.
  465. ! With \fB\-m\fR option, it is possible to give one mail address, and
  466.   \fIkit\fR will invoke \fImailkit\fR to send the archive. There may be
  467.   as many \fB\-m\fR options as needed (to send the same archive to more
  468.   than a single person).
  469. --- 79,86 ----
  470.   (option \fB\-H\fR) or ASCII-encoded with \fIbtoa\fR(1)
  471.   (option \fB\-B\fR, which is used by default) before being shell-archived.
  472.   \fIKit\fR produces files that match "Kit*" regular expression.
  473. ! This default base name can be changed thanks to the \fB\-n\fR option.
  474. ! With the \fB\-m\fR option, it is possible to give one mail address, and
  475.   \fIkit\fR will invoke \fImailkit\fR to send the archive. There may be
  476.   as many \fB\-m\fR options as needed (to send the same archive to more
  477.   than a single person).
  478. ***************
  479. *** 101,113 ****
  480.   for one. If you use the \fB\-k\fR option, \fB\-x\fR is assumed.
  481.   .PP
  482.   It may happen that there are no write permissions in the directory
  483. ! where the root directory to be kitted lies. The \fB-d\fR option enables
  484.   you to specify another directory, where all the temporary files will be
  485.   stored. If you use something like \fI/tmp\fR, you must be careful to use
  486.   \fB\-n\fR to change the base name used (in case someone else is doing
  487. ! the same thing, otherwise files may get mangled).
  488.   .PP
  489. ! When you send a kit to someone which may not have \fIkit\fR, the \fB\-M\fR
  490.   option may be used to include a \fIminikit\fR script, which is a minimal
  491.   set of commands to unkit an unencrypted ASCII-encoded kit. The overhead is
  492.   small (around 4K) and some instructions are provided in the header of every
  493. --- 104,119 ----
  494.   for one. If you use the \fB\-k\fR option, \fB\-x\fR is assumed.
  495.   .PP
  496.   It may happen that there are no write permissions in the directory
  497. ! where the root directory to be kitted lies. The \fB\-d\fR option enables
  498.   you to specify another directory, where all the temporary files will be
  499.   stored. If you use something like \fI/tmp\fR, you must be careful to use
  500.   \fB\-n\fR to change the base name used (in case someone else is doing
  501. ! the same thing, otherwise files may get mangled). To prevent common mistakes,
  502. ! \fIkit\fR will stop and give an error message if the argument of \fB\-d\fR is
  503. ! not a directory, if the directory is not writable by the user, or if
  504. ! a kit file is present in the temporary directory (same base name).
  505.   .PP
  506. ! When you send a kit to someone who may not have \fIkit\fR, the \fB\-M\fR
  507.   option may be used to include a \fIminikit\fR script, which is a minimal
  508.   set of commands to unkit an unencrypted ASCII-encoded kit. The overhead is
  509.   small (around 4K) and some instructions are provided in the header of every
  510. ***************
  511. *** 117,122 ****
  512. --- 123,134 ----
  513.   a unique name of the form \fImkitXXXXX\fR will be generated (XXXXX stands
  514.   for the PID of the \fIkit\fR process).
  515.   .PP
  516. + By using the \fB\-a\fR option, you ask the remote \fIunkit\fR program to send
  517. + an automatic acknowledgment to the specified e-mail address upon successful
  518. + archive extraction. However, this feature is only supported if the remote
  519. + end has at least the 2.0 PL15 release. You will receive a short message with
  520. + a \fIjunk\fR precedence, telling you who extracted the archive and when.
  521. + .PP
  522.   \fIMailkit\fR takes "Kit*" files and sends them to a list of addresses.
  523.   The \fB\-n\fR option can be used to change that base name, if necessary.
  524.   Each message sent corresponds to one part and has its \`Subject:'
  525. ***************
  526. *** 169,178 ****
  527.   a little help message with the syntax and the meaning of the options.
  528.   .SH FILES
  529.   .PD 0
  530. ! .TP 20
  531. ! Kit*
  532. ! files generated by \fIkit\fR
  533. ! .TP
  534.   {zag,zcb,zec}.hex.*
  535.   temporary files used by \fIkit\fR and \fIunkit\fR for datas which
  536.   are hex-encoded.
  537. --- 181,187 ----
  538.   a little help message with the syntax and the meaning of the options.
  539.   .SH FILES
  540.   .PD 0
  541. ! .TP 15
  542.   {zag,zcb,zec}.hex.*
  543.   temporary files used by \fIkit\fR and \fIunkit\fR for datas which
  544.   are hex-encoded.
  545. ***************
  546. *** 181,198 ****
  547.   temporary files used by \fIkit\fR and \fIunkit\fR for datas which
  548.   are ASCII-encoded.
  549.   .TP
  550.   zag*
  551. ! non encrypted files.
  552.   .TP
  553.   zcb*
  554.   data encrypted using CBC mode.
  555.   .TP
  556. ! zec
  557.   data encrypted using ECB mode.
  558.   .TP
  559.   zzz.minikit
  560. ! file holding the name of the provided minikit script.
  561.   .TP
  562.   $privlib/minikit
  563.   the script which may be used to unkit a distribution when the kit
  564.   package is not available.
  565. --- 190,216 ----
  566.   temporary files used by \fIkit\fR and \fIunkit\fR for datas which
  567.   are ASCII-encoded.
  568.   .TP
  569. + Kit*
  570. + files generated by \fIkit\fR
  571. + .TP
  572.   zag*
  573. ! non encrypted temporary files.
  574.   .TP
  575.   zcb*
  576.   data encrypted using CBC mode.
  577.   .TP
  578. ! zec*
  579.   data encrypted using ECB mode.
  580.   .TP
  581.   zzz.minikit
  582. ! file holding the name of the extras files added by kit.
  583. ! .TP
  584. ! zzz.ack
  585. ! contains the address where acknowledgment should be sent.
  586.   .TP
  587. + zzz.subject
  588. + contains the name of kit archive for acknowledgment purposes.
  589. + .TP
  590.   $privlib/minikit
  591.   the script which may be used to unkit a distribution when the kit
  592.   package is not available.
  593. ***************
  594. *** 203,209 ****
  595.   $privlib/rshar
  596.   a simple shell archive maker.
  597.   .PD
  598. ! .SH NOTE
  599.   .PP
  600.   Kit may now be used as a standalone package, i.e. without the help of
  601.   the \fIcshar\fR distribution.
  602. --- 221,227 ----
  603.   $privlib/rshar
  604.   a simple shell archive maker.
  605.   .PD
  606. ! .SH NOTES
  607.   .PP
  608.   Kit may now be used as a standalone package, i.e. without the help of
  609.   the \fIcshar\fR distribution.
  610. ***************
  611. *** 269,274 ****
  612. --- 287,305 ----
  613.   .PP
  614.   Some systems cannot extract tar archives with overwriting of ownership
  615.   informations (usually this is done with tar option -o).
  616. + .PP
  617. + The
  618. + .B \-M
  619. + option is unknown to versions of
  620. + .I kit
  621. + prior to 2.0 PL9, which means the remote
  622. + .I unkit
  623. + program will not be able to clean-up the extras files. Similarly,
  624. + the automatic acknowledgment feature was added at 2.0 PL15. Fortunately,
  625. + .I kit
  626. + programs newer than 2.0 PL9 will know how to deal with the extras files,
  627. + although the acknowledgment feature itself will only be handled by 2.0 PL15 and
  628. + later versions.
  629.   .SH "SEE ALSO"
  630.   atob($manext), btoa($manext), cshar(1), makekit(1).
  631.   .SH AUTHOR
  632.  
  633. Index: badtar/Makefile.SH
  634. Prereq: 2.0.1.1
  635. *** badtar/Makefile.SH.old    Mon Apr 20 17:44:10 1992
  636. --- badtar/Makefile.SH    Mon Apr 20 17:44:11 1992
  637. ***************
  638. *** 18,26 ****
  639.   # Makefile for kit (sub-directory badtar)
  640.   #
  641.   
  642. ! # $Id: Makefile.SH,v 2.0.1.1 92/01/11 19:11:57 ram Exp $
  643.   #
  644.   # $Log:    Makefile.SH,v $
  645.   # Revision 2.0.1.1  92/01/11  19:11:57  ram
  646.   # patch11: created
  647.   # 
  648. --- 18,29 ----
  649.   # Makefile for kit (sub-directory badtar)
  650.   #
  651.   
  652. ! # $Id: Makefile.SH,v 2.0.1.2 92/04/20 17:31:53 ram Exp $
  653.   #
  654.   # $Log:    Makefile.SH,v $
  655. + # Revision 2.0.1.2  92/04/20  17:31:53  ram
  656. + # patch15: now creates directories before installing
  657. + # 
  658.   # Revision 2.0.1.1  92/01/11  19:11:57  ram
  659.   # patch11: created
  660.   # 
  661. ***************
  662. *** 47,54 ****
  663.       /bin/sh badtar.SH
  664.   
  665.   install: badtar $(manpage)
  666.       ../install -s -m 755 badtar $(bin)
  667. !     ../install -m 444 $(manpage) $(man)
  668.   
  669.   clean:
  670.       rm -f *.o badtar $(manpage)
  671. --- 50,61 ----
  672.       /bin/sh badtar.SH
  673.   
  674.   install: badtar $(manpage)
  675. +     ../install -d $(bin)
  676.       ../install -s -m 755 badtar $(bin)
  677. !     -if test "$(man)"; then \
  678. !         ../install -d $(man); \
  679. !         ../install -m 444 $(manpage) $(man); \
  680. !     fi
  681.   
  682.   clean:
  683.       rm -f *.o badtar $(manpage)
  684.  
  685. Index: btoa/Makefile.SH
  686. Prereq: 2.0.1.1
  687. *** btoa/Makefile.SH.old    Mon Apr 20 17:44:14 1992
  688. --- btoa/Makefile.SH    Mon Apr 20 17:44:15 1992
  689. ***************
  690. *** 18,26 ****
  691.   # Makefile for kit (sub-directory btoa)
  692.   #
  693.   
  694. ! # $Id: Makefile.SH,v 2.0.1.1 91/05/27 14:14:41 ram Exp $
  695.   #
  696.   # $Log:    Makefile.SH,v $
  697.   # Revision 2.0.1.1  91/05/27  14:14:41  ram
  698.   # patch5: some dumb make failed on previous makefile
  699.   # 
  700. --- 18,29 ----
  701.   # Makefile for kit (sub-directory btoa)
  702.   #
  703.   
  704. ! # $Id: Makefile.SH,v 2.0.1.2 92/04/20 17:32:09 ram Exp $
  705.   #
  706.   # $Log:    Makefile.SH,v $
  707. + # Revision 2.0.1.2  92/04/20  17:32:09  ram
  708. + # patch15: now creates directories before installing
  709. + # 
  710.   # Revision 2.0.1.1  91/05/27  14:14:41  ram
  711.   # patch5: some dumb make failed on previous makefile
  712.   # 
  713. ***************
  714. *** 54,59 ****
  715. --- 57,63 ----
  716.       $(CC) $(CFLAGS) -o $@ $@.c
  717.   
  718.   install: $(BIN)
  719. +     ../install -d $(bin)
  720.       -for file in $(BIN); do \
  721.           ../install -s -m 755 $$file $(bin); \
  722.       done
  723.  
  724. Index: des/Makefile.SH
  725. Prereq: 2.0.1.4
  726. *** des/Makefile.SH.old    Mon Apr 20 17:44:18 1992
  727. --- des/Makefile.SH    Mon Apr 20 17:44:19 1992
  728. ***************
  729. *** 18,26 ****
  730.   # Makefile for kit (sub-directory des)
  731.   #
  732.   
  733. ! # $Id: Makefile.SH,v 2.0.1.4 92/01/11 19:13:59 ram Exp $
  734.   #
  735.   # $Log:    Makefile.SH,v $
  736.   # Revision 2.0.1.4  92/01/11  19:13:59  ram
  737.   # patch11: now depends on the 'hasdes' configuration variable
  738.   # 
  739. --- 18,29 ----
  740.   # Makefile for kit (sub-directory des)
  741.   #
  742.   
  743. ! # $Id: Makefile.SH,v 2.0.1.5 92/04/20 17:32:21 ram Exp $
  744.   #
  745.   # $Log:    Makefile.SH,v $
  746. + # Revision 2.0.1.5  92/04/20  17:32:21  ram
  747. + # patch15: now creates directories before installing
  748. + # 
  749.   # Revision 2.0.1.4  92/01/11  19:13:59  ram
  750.   # patch11: now depends on the 'hasdes' configuration variable
  751.   # 
  752. ***************
  753. *** 60,65 ****
  754. --- 63,69 ----
  755.       if ./descert < testdata; then touch certify; $(RM) descert descert.o; fi
  756.   
  757.   install: des
  758. +     ../install -d $(bin)
  759.       ../install -s -m 755 des $(bin)
  760.       @echo "    Warning: manual pages for des not installed."
  761.   
  762.  
  763. Index: kit/Makefile.SH
  764. Prereq: 2.0.1.3
  765. *** kit/Makefile.SH.old    Mon Apr 20 17:44:24 1992
  766. --- kit/Makefile.SH    Mon Apr 20 17:44:24 1992
  767. ***************
  768. *** 18,26 ****
  769.   # Makefile for kit (sub-directory kit)
  770.   #
  771.   
  772. ! # $Id: Makefile.SH,v 2.0.1.3 91/11/25 15:49:18 ram Exp $
  773.   #
  774.   # $Log:    Makefile.SH,v $
  775.   # Revision 2.0.1.3  91/11/25  15:49:18  ram
  776.   # patch9: now installs minikit in the private kit library
  777.   # 
  778. --- 18,30 ----
  779.   # Makefile for kit (sub-directory kit)
  780.   #
  781.   
  782. ! # $Id: Makefile.SH,v 2.0.1.4 92/04/20 17:32:57 ram Exp $
  783.   #
  784.   # $Log:    Makefile.SH,v $
  785. + # Revision 2.0.1.4  92/04/20  17:32:57  ram
  786. + # patch15: now creates directories before installing
  787. + # patch15: minikit is now created via a .SH file
  788. + # 
  789.   # Revision 2.0.1.3  91/11/25  15:49:18  ram
  790.   # patch9: now installs minikit in the private kit library
  791.   # 
  792. ***************
  793. *** 42,49 ****
  794.   
  795.   !GROK!THIS!
  796.   $spitshell >>Makefile <<'!NO!SUBS!'
  797. ! scripts = kit mailkit unkit
  798. ! scriptsh = kit.SH mailkit.SH unkit.SH
  799.   added = Makefile config.sh
  800.   
  801.   all: $(scripts)
  802. --- 46,54 ----
  803.   
  804.   !GROK!THIS!
  805.   $spitshell >>Makefile <<'!NO!SUBS!'
  806. ! bin = kit mailkit unkit
  807. ! scripts = $(bin) minikit
  808. ! scriptsh = kit.SH mailkit.SH unkit.SH minikit.SH
  809.   added = Makefile config.sh
  810.   
  811.   all: $(scripts)
  812. ***************
  813. *** 57,66 ****
  814.   unkit: unkit.SH
  815.       sh $@.SH
  816.   
  817.   install: $(scripts)
  818. !     -for file in $(scripts); do \
  819.           ../install -m 755 $$file $(binsh); \
  820.       done
  821.       ../install -m 644 minikit $(libdir)
  822.   
  823.   clean:
  824. --- 62,76 ----
  825.   unkit: unkit.SH
  826.       sh $@.SH
  827.   
  828. + minikit: minikit.SH
  829. +     sh $@.SH
  830.   install: $(scripts)
  831. !     ../install -d $(binsh)
  832. !     -for file in $(bin); do \
  833.           ../install -m 755 $$file $(binsh); \
  834.       done
  835. +     ../install -d $(libdir)
  836.       ../install -m 644 minikit $(libdir)
  837.   
  838.   clean:
  839.  
  840. Index: man/Makefile.SH
  841. Prereq: 2.0.1.2
  842. *** man/Makefile.SH.old    Mon Apr 20 17:44:50 1992
  843. --- man/Makefile.SH    Mon Apr 20 17:44:51 1992
  844. ***************
  845. *** 18,26 ****
  846.   # Makefile for kit (sub-directory man)
  847.   #
  848.   
  849. ! # $Id: Makefile.SH,v 2.0.1.2 91/05/27 14:30:53 ram Exp $
  850.   #
  851.   # $Log:    Makefile.SH,v $
  852.   # Revision 2.0.1.2  91/05/27  14:30:53  ram
  853.   # patch5: search for config.sh is now silent
  854.   # 
  855. --- 18,29 ----
  856.   # Makefile for kit (sub-directory man)
  857.   #
  858.   
  859. ! # $Id: Makefile.SH,v 2.0.1.3 92/04/20 17:39:21 ram Exp $
  860.   #
  861.   # $Log:    Makefile.SH,v $
  862. + # Revision 2.0.1.3  92/04/20  17:39:21  ram
  863. + # patch15: now creates directories before installing
  864. + # 
  865.   # Revision 2.0.1.2  91/05/27  14:30:53  ram
  866.   # patch5: search for config.sh is now silent
  867.   # 
  868. ***************
  869. *** 54,59 ****
  870. --- 57,63 ----
  871.   
  872.   install: all
  873.       -if test "$(man)"; then \
  874. +         ../install -d $(man); \
  875.           for file in $(manpage); do \
  876.               ../install -m 444 $$file $(man); \
  877.           done; \
  878.  
  879. Index: shar/Makefile.SH
  880. Prereq: 2.0.1.1
  881. *** shar/Makefile.SH.old    Mon Apr 20 17:45:01 1992
  882. --- shar/Makefile.SH    Mon Apr 20 17:45:03 1992
  883. ***************
  884. *** 18,26 ****
  885.   # Makefile for kit (sub-directory shar)
  886.   #
  887.   
  888. ! # $Id: Makefile.SH,v 2.0.1.1 92/01/11 19:22:47 ram Exp $
  889.   #
  890.   # $Log:    Makefile.SH,v $
  891.   # Revision 2.0.1.1  92/01/11  19:22:47  ram
  892.   # patch11: created
  893.   # 
  894. --- 18,29 ----
  895.   # Makefile for kit (sub-directory shar)
  896.   #
  897.   
  898. ! # $Id: Makefile.SH,v 2.0.1.2 92/04/20 17:42:50 ram Exp $
  899.   #
  900.   # $Log:    Makefile.SH,v $
  901. + # Revision 2.0.1.2  92/04/20  17:42:50  ram
  902. + # patch15: now creates directories before installing
  903. + # 
  904.   # Revision 2.0.1.1  92/01/11  19:22:47  ram
  905.   # patch11: created
  906.   # 
  907. ***************
  908. *** 45,50 ****
  909. --- 48,54 ----
  910.       sh $@.SH
  911.   
  912.   install: $(scripts)
  913. +     ../install -d $(libdir)
  914.       -for file in $(scripts); do \
  915.           ../install -m 555 $$file $(libdir); \
  916.       done
  917.  
  918. Index: kit/minikit.SH
  919. *** kit/minikit.SH.old    Mon Apr 20 17:44:40 1992
  920. --- kit/minikit.SH    Mon Apr 20 17:44:41 1992
  921. ***************
  922. *** 0 ****
  923. --- 1,187 ----
  924. + case $CONFIG in
  925. + '')
  926. +     if test ! -f config.sh; then
  927. +         ln ../config.sh . || \
  928. +         ln ../../config.sh . || \
  929. +         ln ../../../config.sh . || \
  930. +         (echo "Can't find config.sh."; exit 1)
  931. +     fi 2>/dev/null
  932. +     . ./config.sh
  933. +     ;;
  934. + esac
  935. + case "$0" in
  936. + */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  937. + esac
  938. + # $Id: minikit.SH,v 2.0.1.1 92/04/20 17:38:35 ram Exp $
  939. + #
  940. + # $Log:    minikit.SH,v $
  941. + # Revision 2.0.1.1  92/04/20  17:38:35  ram
  942. + # patch15: minikit now extracted via a .SH file
  943. + # patch15: added acknowledgment support
  944. + # patch15: replaced space indentation with tabs
  945. + # 
  946. + echo "Extracting kit/minikit (with variable substitutions)"
  947. + $spitshell >minikit <<!GROK!THIS!
  948. + #! /bin/sh
  949. + export PATH || exec sh \$0
  950. + ver='$VERSION'
  951. + pl='$PATCHLEVEL'
  952. + !GROK!THIS!
  953. + $spitshell >>minikit <<'!NO!SUBS!'
  954. + trap "rm -f mini_unkit mini_code.c core mini_code; exit 1" 1 2 3 15
  955. + echo "Minikit [version $ver PL$pl]"
  956. + echo "Extracting mini kit..."
  957. + cat >mini_code.c <<'EOP'
  958. + #include <stdio.h>
  959. + #define reg register
  960. + #define streq(s0, s1)  strcmp(s0, s1) == 0
  961. + #define times85(x)    ((((((x<<2)+x)<<2)+x)<<2)+x)
  962. + #define DE(c) ((c) - '!')
  963. + long int Ceor = 0;
  964. + long int Csum = 0;
  965. + long int Crot = 0;
  966. + long int w = 0;
  967. + long int b = 0;
  968. + fatal()
  969. + {
  970. +     fprintf(stderr, "bad format or Csum to atob\n");
  971. +     exit(1);
  972. + }
  973. + decode(c) reg c;
  974. + {
  975. +     if (c == 'z') {
  976. +         if (b != 0) {
  977. +             fatal();
  978. +         } else {
  979. +             bo(0); bo(0); bo(0); bo(0);
  980. +         }
  981. +     } else if ((c >= '!') && (c < ('!' + 85))) {
  982. +         if (b == 0) {
  983. +             w = DE(c);
  984. +             ++b;
  985. +         } else if (b < 4) {
  986. +             w = times85(w);
  987. +             w += DE(c);
  988. +             ++b;
  989. +         } else {
  990. +             w = times85(w) + DE(c);
  991. +             bo((int)((w >> 24) & 255));
  992. +             bo((int)((w >> 16) & 255));
  993. +             bo((int)((w >> 8) & 255));
  994. +             bo((int)(w & 255));
  995. +             w = 0;
  996. +             b = 0;
  997. +         }
  998. +     } else {
  999. +         fatal();
  1000. +     }
  1001. + }
  1002. + FILE *t;
  1003. + bo(c) reg c;
  1004. + {
  1005. +     Ceor ^= c;
  1006. +     Csum += c;
  1007. +     Csum += 1;
  1008. +     if ((Crot & 0x80000000)) {
  1009. +         Crot <<= 1;
  1010. +         Crot += 1;
  1011. +     } else
  1012. +         Crot <<= 1;
  1013. +     Crot += c;
  1014. +     putc(c, t);
  1015. + }
  1016. + main(argc, argv) char **argv;
  1017. + {
  1018. +     reg c;
  1019. +     reg long int i;
  1020. +     char n[100];
  1021. +     char buf[100];
  1022. +     long int n1, n2, oeor, osum, orot;
  1023. +     if (argc != 1) {
  1024. +         fprintf(stderr,"bad args to %s\n", argv[0]);
  1025. +         exit(2);
  1026. +     }
  1027. +     sprintf(n, "/usr/tmp/atob.%x", getpid());
  1028. +     t = fopen(n, "w+");
  1029. +     if (t == NULL)
  1030. +         fatal();
  1031. +     unlink(n);
  1032. +     for (;;) {
  1033. +         if (fgets(buf, sizeof buf, stdin) == NULL)
  1034. +             fatal();
  1035. +         if (streq(buf, "xbtoa Begin\n"))
  1036. +             break;
  1037. +     }
  1038. +     while ((c = getchar()) != EOF) {
  1039. +         if (c == '\n')
  1040. +             continue;
  1041. +         else if (c == 'x')
  1042. +             break;
  1043. +         else
  1044. +             decode(c);
  1045. +     }
  1046. +     if(scanf("btoa End N %ld %lx E %lx S %lx R %lx\n",&n1,&n2,&oeor,&osum,&orot)!=5)
  1047. +         fatal();
  1048. +     if ((n1 != n2) || (oeor != Ceor) || (osum != Csum) || (orot != Crot))
  1049. +         fatal();
  1050. +     else {
  1051. +         fseek(t, 0L, 0);
  1052. +         for (i = n1; --i >= 0;)
  1053. +             putchar(getc(t));
  1054. +     }
  1055. +     exit(0);
  1056. + }
  1057. + EOP
  1058. + cat >mini_unkit<<EOP
  1059. + ver='$ver'
  1060. + pl='$pl'
  1061. + EOP
  1062. + cat >>mini_unkit <<'EOP'
  1063. + if tar -cf - /dev/null 2>/dev/null | tar -xof - >/dev/null 2>&1; then
  1064. +     tar_opt='xvof'
  1065. + else
  1066. +     tar_opt='xvf'
  1067. + fi
  1068. + if test -f zag.ba.aa; then
  1069. +     cat `ls zag.ba.??` | ./mini_code | zcat | tar $tar_opt - || exit 1
  1070. + else
  1071. +     echo >&2 "Sorry, I can only deal with plain ascii-encoded kits"
  1072. +     exit 1
  1073. + fi
  1074. + if test -f zzz.ack -a -f /usr/lib/sendmail; then
  1075. +     s=`cat zzz.ack`
  1076. +     sb=`cat zzz.subject`
  1077. +     echo "Sending acknowledgment to $s..."
  1078. +     u=`(logname) 2>/dev/null || whoami`
  1079. +     h=`(uname -n) 2>/dev/null || hostname 2>/dev/null`
  1080. +     d=`date`
  1081. +     /usr/lib/sendmail $s <<EOM
  1082. + Subject: Kit received [$sb]
  1083. + To: $s
  1084. + Precedence: junk
  1085. + X-Mailer: minikit [version $ver PL$pl]
  1086. + Your kit archive labeled '$sb' has been
  1087. + unpacked by $u@$h on $d.
  1088. + EOM
  1089. + fi
  1090. + test -f zzz.minikit && rm -f `cat zzz.minikit` zzz.minikit
  1091. + rm -f z??.[hb][ea]*.??
  1092. + EOP
  1093. + echo "Compiling mini kit..."
  1094. + if cc -o mini_code mini_code.c >/dev/null 2>&1; then
  1095. +     echo "Running mini kit..."
  1096. +     sh mini_unkit
  1097. + else
  1098. +     echo "Error in C compilation--aborting."
  1099. + fi
  1100. + rm -f core mini_code mini_code.c mini_unkit
  1101. + echo "Done."
  1102. + !NO!SUBS!
  1103. + chmod 755 minikit
  1104. + $eunicefix minikit
  1105.  
  1106. Index: kit/mailkit.SH
  1107. Prereq: 2.0.1.6
  1108. *** kit/mailkit.SH.old    Mon Apr 20 17:44:36 1992
  1109. --- kit/mailkit.SH    Mon Apr 20 17:44:37 1992
  1110. ***************
  1111. *** 18,26 ****
  1112.   # @(#) Mailer for kit files
  1113.   # @(#) (c) R. Manfredi, 1990 1991
  1114.   
  1115. ! # $Id: mailkit.SH,v 2.0.1.6 92/01/13 14:14:21 ram Exp $
  1116.   #
  1117.   # $Log:    mailkit.SH,v $
  1118.   # Revision 2.0.1.6  92/01/13  14:14:21  ram
  1119.   # patch13: fixed the option parsing code
  1120.   # 
  1121. --- 18,31 ----
  1122.   # @(#) Mailer for kit files
  1123.   # @(#) (c) R. Manfredi, 1990 1991
  1124.   
  1125. ! # $Id: mailkit.SH,v 2.0.1.7 92/04/20 17:37:36 ram Exp $
  1126.   #
  1127.   # $Log:    mailkit.SH,v $
  1128. + # Revision 2.0.1.7  92/04/20  17:37:36  ram
  1129. + # patch15: added the bulk Precedence and X-Mailer headers
  1130. + # patch15: fixed incorrect help message regarding -l
  1131. + # patch15: changed verbose messages for consistency with other scripts
  1132. + # 
  1133.   # Revision 2.0.1.6  92/01/13  14:14:21  ram
  1134.   # patch13: fixed the option parsing code
  1135.   # 
  1136. ***************
  1137. *** 80,86 ****
  1138.   echo " "" -e : edit a message that will be added to every part";
  1139.   echo " "" -f : feed message from stdin to every part";
  1140.   echo " "" -h : to print this help message.";
  1141. ! echo " "" -l : get recipients from a file (address_list is ignored).";
  1142.   echo " "" -n : set the basename of parts to be sent (default is $partname).";
  1143.   echo " "" -p : preserve files sent.";
  1144.   exit 1;
  1145. --- 85,91 ----
  1146.   echo " "" -e : edit a message that will be added to every part";
  1147.   echo " "" -f : feed message from stdin to every part";
  1148.   echo " "" -h : to print this help message.";
  1149. ! echo " "" -l : get recipients from a file.";
  1150.   echo " "" -n : set the basename of parts to be sent (default is $partname).";
  1151.   echo " "" -p : preserve files sent.";
  1152.   exit 1;
  1153. ***************
  1154. *** 244,255 ****
  1155.       # Protect against unexisting/unreadable files matching "$partname*"
  1156.       if  test -f $i -a -r $i
  1157.       then
  1158. !         echo Mailing $i \($prog_name\)
  1159.           # System V /bin/mail does not recognize header correctly, unless the
  1160.           # first line is a subject. Oh well...
  1161.           cat > $topmsg <<EOH
  1162.   Subject: $prog_name - kit #$part_num / $nfiles
  1163.   To: $address
  1164.   
  1165.   EOH
  1166.           # Has edit been requested ?
  1167. --- 249,262 ----
  1168.       # Protect against unexisting/unreadable files matching "$partname*"
  1169.       if  test -f $i -a -r $i
  1170.       then
  1171. !         echo "Mailing $i..."
  1172.           # System V /bin/mail does not recognize header correctly, unless the
  1173.           # first line is a subject. Oh well...
  1174.           cat > $topmsg <<EOH
  1175.   Subject: $prog_name - kit #$part_num / $nfiles
  1176.   To: $address
  1177. + Precedence: bulk
  1178. + X-Mailer: mailkit [version $version PL$pl]
  1179.   
  1180.   EOH
  1181.           # Has edit been requested ?
  1182. ***************
  1183. *** 273,279 ****
  1184.           $mailer $address < $topmsg
  1185.           rm -f $topmsg
  1186.       else
  1187. !         echo $this_prog: could not open $i >&2
  1188.       fi
  1189.   done
  1190.   
  1191. --- 280,286 ----
  1192.           $mailer $address < $topmsg
  1193.           rm -f $topmsg
  1194.       else
  1195. !         echo "$this_prog: could not open $i" >&2
  1196.       fi
  1197.   done
  1198.   
  1199. ***************
  1200. *** 283,294 ****
  1201.       cat > $topmsg <<EOM
  1202.   Subject: $prog_name - kit #0 / $nfiles
  1203.   To: $address
  1204.   
  1205.   [ This is an instruction message for the $prog_name kit ]
  1206.   
  1207.   EOM
  1208.       cat >>$topmsg <$message
  1209. !     echo Mailing instructions \($prog_name\)
  1210.       $mailer $address < $topmsg
  1211.       rm -f $topmsg
  1212.   fi
  1213. --- 290,303 ----
  1214.       cat > $topmsg <<EOM
  1215.   Subject: $prog_name - kit #0 / $nfiles
  1216.   To: $address
  1217. + Precedence: bulk
  1218. + X-Mailer: mailkit [version $version PL$pl]
  1219.   
  1220.   [ This is an instruction message for the $prog_name kit ]
  1221.   
  1222.   EOM
  1223.       cat >>$topmsg <$message
  1224. !     echo "Mailing instructions..."
  1225.       $mailer $address < $topmsg
  1226.       rm -f $topmsg
  1227.   fi
  1228.  
  1229. Index: kit/unkit.SH
  1230. Prereq: 2.0.1.9
  1231. *** kit/unkit.SH.old    Mon Apr 20 17:44:45 1992
  1232. --- kit/unkit.SH    Mon Apr 20 17:44:47 1992
  1233. ***************
  1234. *** 19,27 ****
  1235.   # @(#) (c) E. Mogenet April 1990
  1236.   # @(#) (c) R. Manfredi, 1990 1991
  1237.   
  1238. ! # $Id: unkit.SH,v 2.0.1.9 92/01/13 14:20:37 ram Exp $
  1239.   #
  1240.   # $Log:    unkit.SH,v $
  1241.   # Revision 2.0.1.9  92/01/13  14:20:37  ram
  1242.   # patch13: fixed the option parsing code
  1243.   # patch13: unkit may be used to actually do an unshar
  1244. --- 19,30 ----
  1245.   # @(#) (c) E. Mogenet April 1990
  1246.   # @(#) (c) R. Manfredi, 1990 1991
  1247.   
  1248. ! # $Id: unkit.SH,v 2.0.1.10 92/04/20 17:39:08 ram Exp $
  1249.   #
  1250.   # $Log:    unkit.SH,v $
  1251. + # Revision 2.0.1.10  92/04/20  17:39:08  ram
  1252. + # patch15: added support for acknowledgment
  1253. + # 
  1254.   # Revision 2.0.1.9  92/01/13  14:20:37  ram
  1255.   # patch13: fixed the option parsing code
  1256.   # patch13: unkit may be used to actually do an unshar
  1257. ***************
  1258. *** 68,73 ****
  1259. --- 71,79 ----
  1260.   
  1261.   # Tar options to be used
  1262.   badtar='$needbtar'
  1263. + # Mailer to be used for acknowledgments
  1264. + mailer="$mailer"
  1265.   !GROK!THIS!
  1266.   
  1267.   case "$d_portable" in
  1268. ***************
  1269. *** 193,202 ****
  1270.   
  1271.   echo "Decoding with $decoding | zcat | $tarcmd"
  1272.   
  1273.   cat `ls z??.[hb][ea]*.??` |
  1274.   eval $decoding        |
  1275.   zcat                |
  1276. ! eval "$tarcmd"
  1277.   
  1278.   test -f zzz.minikit && rm -f `cat zzz.minikit` zzz.minikit
  1279.   rm -f z??.[hb][ea]*.??
  1280. --- 199,230 ----
  1281.   
  1282.   echo "Decoding with $decoding | zcat | $tarcmd"
  1283.   
  1284. + status=1
  1285.   cat `ls z??.[hb][ea]*.??` |
  1286.   eval $decoding        |
  1287.   zcat                |
  1288. ! eval "$tarcmd" && status=0
  1289. ! # Send acknowledgment only when unpacking was successful.
  1290. ! if test -f zzz.ack -a $status -eq 0; then
  1291. !     sender=`cat zzz.ack`
  1292. !     subject=`cat zzz.subject`
  1293. !     echo "Sending acknowledgment to $sender..."
  1294. !     # There has to be a space between the two '(' for ksh.
  1295. !     user=`(logname) 2>/dev/null || whoami`
  1296. !     host=`(uname -n) 2>/dev/null || hostname 2>/dev/null`
  1297. !     date=`date`
  1298. !     $mailer $sender <<EOM
  1299. ! Subject: Kit received [$subject]
  1300. ! To: $sender
  1301. ! Precedence: junk
  1302. ! X-Mailer: unkit [version $version PL$pl]
  1303. ! Your kit archive labeled '$subject' has been
  1304. ! unpacked by $user@$host on $date.
  1305. ! EOM
  1306. !     echo "Done."
  1307. ! fi
  1308.   
  1309.   test -f zzz.minikit && rm -f `cat zzz.minikit` zzz.minikit
  1310.   rm -f z??.[hb][ea]*.??
  1311.  
  1312. Index: shar/rshar.SH
  1313. Prereq: 2.0.1.3
  1314. *** shar/rshar.SH.old    Mon Apr 20 17:45:08 1992
  1315. --- shar/rshar.SH    Mon Apr 20 17:45:08 1992
  1316. ***************
  1317. *** 17,25 ****
  1318.   $startsh
  1319.   # (c) Raphael Manfredi, December 25th 1991
  1320.   
  1321. ! # $Id: rshar.SH,v 2.0.1.3 92/03/24 13:46:04 ram Exp $
  1322.   #
  1323.   # $Log:    rshar.SH,v $
  1324.   # Revision 2.0.1.3  92/03/24  13:46:04  ram
  1325.   # patch14: determination of user name made more portable
  1326.   # patch14: a missing quote led to a syntactically incorrect archive
  1327. --- 17,28 ----
  1328.   $startsh
  1329.   # (c) Raphael Manfredi, December 25th 1991
  1330.   
  1331. ! # $Id: rshar.SH,v 2.0.1.4 92/04/20 17:43:22 ram Exp $
  1332.   #
  1333.   # $Log:    rshar.SH,v $
  1334. + # Revision 2.0.1.4  92/04/20  17:43:22  ram
  1335. + # patch15: determination of user and host no longer uses a sub-shell
  1336. + # 
  1337.   # Revision 2.0.1.3  92/03/24  13:46:04  ram
  1338.   # patch14: determination of user name made more portable
  1339.   # patch14: a missing quote led to a syntactically incorrect archive
  1340. ***************
  1341. *** 70,78 ****
  1342.       esac
  1343.   done
  1344.   
  1345. ! # Who and where am I? -- white space between '(' is needed in case ksh is used
  1346. ! user=`( (logname) || whoami) 2>/dev/null`
  1347. ! host=`( (uname -n) || hostname) 2>/dev/null`
  1348.   
  1349.   echo '#! /bin/sh
  1350.   # This is a shell archive.  Remove anything before this line, then feed it
  1351. --- 73,81 ----
  1352.       esac
  1353.   done
  1354.   
  1355. ! # Who and where am I?
  1356. ! user=`(logname) 2>/dev/null || whoami`
  1357. ! host=`(uname -n) 2>/dev/null || hostname`
  1358.   
  1359.   echo '#! /bin/sh
  1360.   # This is a shell archive.  Remove anything before this line, then feed it
  1361.  
  1362. Index: Configure
  1363. Prereq: 2.0.1.5
  1364. *** Configure.old    Mon Apr 20 17:43:55 1992
  1365. --- Configure    Mon Apr 20 17:43:57 1992
  1366. ***************
  1367. *** 16,22 ****
  1368.   # Write to ram@eiffel.com (Raphael Manfredi) and I will send you the
  1369.   # latest revision of the dist package, which includes metaconfig.)
  1370.   
  1371. ! # $Id: Configure,v 2.0.1.5 92/01/11 19:08:09 ram Exp $
  1372.   #
  1373.   # Generated on Sat Jan 11 19:03:07 PST 1992 [metaconfig 2.8 PL13]
  1374.   
  1375. --- 16,22 ----
  1376.   # Write to ram@eiffel.com (Raphael Manfredi) and I will send you the
  1377.   # latest revision of the dist package, which includes metaconfig.)
  1378.   
  1379. ! # $Id: Configure,v 2.0.1.6 92/04/20 17:30:40 ram Exp $
  1380.   #
  1381.   # Generated on Sat Jan 11 19:03:07 PST 1992 [metaconfig 2.8 PL13]
  1382.   
  1383. ***************
  1384. *** 2223,2229 ****
  1385.       dflt='y'
  1386.       rp='Would you like to have badtar installed?'
  1387.       . myread
  1388. !     case "$and" in
  1389.       n*|N*) wantbtar='false';;
  1390.       esac
  1391.       ;;
  1392. --- 2223,2229 ----
  1393.       dflt='y'
  1394.       rp='Would you like to have badtar installed?'
  1395.       . myread
  1396. !     case "$ans" in
  1397.       n*|N*) wantbtar='false';;
  1398.       esac
  1399.       ;;
  1400.  
  1401. Index: MANIFEST
  1402. *** MANIFEST.old    Mon Apr 20 17:45:12 1992
  1403. --- MANIFEST    Mon Apr 20 17:45:13 1992
  1404. ***************
  1405. *** 27,33 ****
  1406.   kit/Makefile.SH            Makefile for scripts
  1407.   kit/kit.SH                 The main script-shell
  1408.   kit/mailkit.SH             Mails parts generated by "kit"
  1409. ! kit/minikit                The minikit script for kit extraction
  1410.   kit/unkit.SH               Reversal of "kit"
  1411.   man/Makefile.SH            Makefile for manual pages
  1412.   man/atob.SH                Manual page for "atob"
  1413. --- 27,33 ----
  1414.   kit/Makefile.SH            Makefile for scripts
  1415.   kit/kit.SH                 The main script-shell
  1416.   kit/mailkit.SH             Mails parts generated by "kit"
  1417. ! kit/minikit.SH             The minikit script for kit extraction
  1418.   kit/unkit.SH               Reversal of "kit"
  1419.   man/Makefile.SH            Makefile for manual pages
  1420.   man/atob.SH                Manual page for "atob"
  1421.  
  1422. Index: README
  1423. *** README.old    Mon Apr 20 17:44:06 1992
  1424. --- README    Mon Apr 20 17:44:06 1992
  1425. ***************
  1426. *** 81,90 ****
  1427. --- 81,93 ----
  1428.   ACKNOWLEDGMENTS
  1429.   
  1430.   I would like to thank:
  1431.       Gary Casterline <casterln@are.berkeley.edu>
  1432. +     Robert M. Cothren <rim@marvin.ri.ccf.org>
  1433.       Michael Fischer <fischer-michael@cs.yale.edu>
  1434.       Gurvan Lullien <lullien@inf.enst.fr>
  1435.       Monty Solomon <roscom!monty@think.com>
  1436.   for their bug reports and comments.
  1437.   
  1438.   The criticism of Tim Kuehn <timk@wynnds.xenitec.on.ca> was also much
  1439.  
  1440. *** End of Patch 15 ***
  1441.