Xref: utzoo comp.sources.unix:575 comp.sources.bugs:1003 Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!pacbell!lll-tis!helios.ee.lbl.gov!pasteur!agate!ig!uwmcsd1!bbn!bbn.com!rsalz From: rsalz@bbn.com (Rich Salz) Newsgroups: comp.sources.unix,comp.sources.bugs Subject: v15i035: Tools to create and unpack shell archives, Patch2 Message-ID: <888@fig.bbn.com> Date: 3 Jun 88 20:12:52 GMT Article-I.D.: fig.888 Organization: BBN Laboratories Inc., Cambridge MA Lines: 116 Approved: rsalz@uunet.UU.NET Summary: This is an official patch for cshar 2.0; please apply it. Submitted-by: Rich $alz Posting-number: Volume 15, Issue 35 Archive-name: cshar/patch2 Description: From: Bob Mitchell +Unshar doesn't properly cd to the specified directory, leaving unpacked files in the directory it was started from. Fix: To aid in robustness, patches are not shipped "raw"; I apologize for the inconvenience. Save this message and unshar it; from rn, say "|unshar -d DIR", where DIR is your cshar source directory. Outside of rn, say "cd DIR; unshar 'patch02' <<'END_OF_FILE' Index: patchlevel.h Prereq: 2.1 X*** /tmp/,RCSt1a26117 Fri Jun 3 16:09:09 1988 X--- patchlevel.h Fri Jun 3 16:08:46 1988 X*************** X*** 2,7 **** X--- 2,10 ---- X ** This file records official patches. RCS records the edit log. X ** X ** $Log: patchlevel.h,v $ X+ ** Revision 2.2 88/06/03 16:08:37 rsalz X+ ** patch02: Fix order of chdir/mkdir commands for unshar. X+ ** X ** Revision 2.1 88/06/03 12:16:40 rsalz X ** patch01: Add config.x386 and config.sVr3; change "dirent.h" to X ** patch01: In Makefile, use $(DIRLIB) only in actions, not dependencies; X*************** X*** 16,19 **** X ** Revision 2.0 88/05/27 13:32:13 rsalz X ** First comp.sources.unix release X */ X! #define PATCHLEVEL 1 X--- 19,22 ---- X ** Revision 2.0 88/05/27 13:32:13 rsalz X ** First comp.sources.unix release X */ X! #define PATCHLEVEL 2 X*** /tmp/,RCSt1a26117 Fri Jun 3 16:09:12 1988 X--- unshar.c Fri Jun 3 16:08:48 1988 X*************** X*** 6,12 **** X #include "shar.h" X #ifdef RCSID X static char RCS[] = X! "$Header: unshar.c,v 2.1 88/06/03 11:39:33 rsalz Exp $"; X #endif /* RCSID */ X X X--- 6,12 ---- X #include "shar.h" X #ifdef RCSID X static char RCS[] = X! "$Header: unshar.c,v 2.2 88/06/03 16:08:14 rsalz Exp $"; X #endif /* RCSID */ X X X*************** X*** 338,344 **** X } X X /* Got directory; try to go there. Only make last component. */ X! if (chdir(p) < 0 && mkdir(p, 0777) < 0 && chdir(p) < 0) X Quit("Cannot chdir nor mkdir desired directory"); X } X else X--- 338,344 ---- X } X X /* Got directory; try to go there. Only make last component. */ X! if (chdir(p) < 0 && (mkdir(p, 0777) < 0 || chdir(p) < 0)) X Quit("Cannot chdir nor mkdir desired directory"); X } X else END_OF_FILE if test 1748 -ne `wc -c <'patch02'`; then echo shar: \"'patch02'\" unpacked with wrong size! fi # end of 'patch02' fi echo shar: End of shell archive. exit 0 -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.