Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!purdue!decwrl!sun!mongo!waynet From: waynet@mongo.uucp (Wayne Thompson) Newsgroups: comp.sys.amiga Subject: Re: Admin sources/binaries Message-ID: <33605@mongo.uucp> Date: 27 Jan 89 16:06:12 GMT References: <764@zehntel.UUCP> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 110 In-reply-to: donw@zehntel's message of 24 Jan 89 20:53:57 GMT I threw these together a while back and they work for me. Wayne #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # unpack # unshar # This archive created: Fri Jan 27 08:05:48 1989 export PATH; PATH=/bin:/usr/bin:$PATH echo shar: "extracting 'unpack'" '(660 characters)' if test -f 'unpack' then echo shar: "will not over-write existing file 'unpack'" else sed 's/^ X//' << \SHAR_EOF > 'unpack' X#! /bin/sh X# unpack archives - W. Thompson - 02/19/87 X Xfor i Xdo X while true X do X file=`ls $i*` X case $file in X *.tar) X tar xvpf $file X if [ $? -ne 0 ] X then X exit X else X break X fi X ;; X *.shar) X unshar $file X if [ $? -ne 0 ] X then X exit X else X break X fi X ;; X *.zoo) X zoo e $file X if [ $? -ne 0 ] X then X exit X else X break X fi X ;; X *.Z) X uncompress $file X if [ $? -ne 0 ] X then X exit X fi X ;; X *.uu|*.uue) X uudecode $file X if [ $? -ne 0 ] X then X exit X fi X mv $file $file. X ;; X *) break X ;; X esac X done Xdone X SHAR_EOF if test 660 -ne "`wc -c < 'unpack'`" then echo shar: "error transmitting 'unpack'" '(should have been 660 characters)' fi chmod +x 'unpack' fi echo shar: "extracting 'unshar'" '(284 characters)' if test -f 'unshar' then echo shar: "will not over-write existing file 'unshar'" else sed 's/^ X//' << \SHAR_EOF > 'unshar' X#! /bin/sh X# unshar multiple files - 12/18/86 - W. Thompson Xfor i Xdo X echo "<-<-<-<-<-<-<-<-<-<- USHARING '$i' ->->->->->->->->->->" X awk ' X /^#/ { pr = 1 } # assumed bof X /^:/ { pr = 1 } # assumed bof X /^--$/ { exit } # assumed eof X pr == 1 { print } X ' $i | sh Xdone SHAR_EOF if test 284 -ne "`wc -c < 'unshar'`" then echo shar: "error transmitting 'unshar'" '(should have been 284 characters)' fi chmod +x 'unshar' fi exit 0 # End of shell archive