🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #26039

Mac binary joiner (Bourne shell)

#26039
From: Steve Ring
Date: Mon, 07 Mar 1988 15:32
61 lines
2018 bytes
A while ago some posted a csh script to join mac binaries. I turned this
into a bourne shell script and added some other features. Since we get
binaries in parts, I leave them in parts (z1, z2, z3, etc), save them
all in one directory, then run this script on each set.

--X---CUT HERE--X---CUT HERE--X---CUT HERE--X---CUT HERE--X---CUT HERE--X--
:
#
#	Mac binary joiner. Save Mac binary files from net in
#		files with names like t1, t2, t3...
#		or ww1, ww2, ww3, then
#		run this script as "macjoin t" or "macjoin ww"
#		Output file will be names "t.mac" or "ww.mac"
#		after which you can rename it to anything else.
#
#	Steve Ring
#	Compugraphic Corp.
#
#	

W=`basename $0`
echo "Usage:	$W file{1,2,3,...} > file.mac"

> $1.mac                                                        
echo -n "-- Mac Join: < "
for i in ${1}1 ${1}2 ${1}3 ${1}4 ${1}5 ${1}6 ${1}7 ${1}8 ${1}9 ; do
	[ -s $i ] && {
#
#	-- Note: some macbinaries may have spaces after "---"
#	-- If so, just swap the next 2 lines
#
# 	 sed -n -e '/^--- /,/^--- /  p' $i | sed -e '/^--- / d' >> $1.mac
#
	 sed -n -e '/^---/,/^---/  p' $i | sed -e '/^---/ d' >> $1.mac
 	 echo -n "$i, "
	}
done

echo ">"
echo -n "-- Re-name this $1(.mac) to ?=> "
read X

[ -s $X.mac ] && {
	echo -n "	?? \"$X.mac\" exists. Overwrite :y/n: ?=> "
	read XX
	[ "$XX" = 'n' ] && {
		echo "	..OK, $1.mac left alone"
		ls -sl $1.mac
		exit
	}
}
/bin/mv $1.mac $X.mac
echo "	..OK, moved, see $X.mac"
ls -sl $X.mac
###

-- 
...!{decvax,ima,ism780c,ulowell,laidbak,cgeuro,cg-f}!cg-atla!ring
Steve Ring 
CompuGraphic Corp. 
Wilmington, Mass., 01887, (617) 658-5600, x5092
Technical Details
Message-ID: <2037@cg-atla.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!m2c!ulowell!cg-atla!ring

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!m2c!ulowell!cg-atla!ring
From: ring@cg-atla.UUCP (Steve Ring)
Newsgroups: comp.sys.mac
Subject: Mac binary joiner (Bourne shell)
Message-ID: <2037@cg-atla.UUCP>
Date: 7 Mar 88 15:32:44 GMT
Distribution: comp
Organization: Compugraphic Corp., Wilmington, Mass
Lines: 61
Keywords: Mac binary, bourne shell