aboutsummaryrefslogtreecommitdiffstats
path: root/release/extract.sh
blob: bffca5a12b364b504a5da7a8511b403bbcefd84d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# $Id: extract.sh,v 1.14 1994/11/20 22:55:24 phk Exp $
PATH=/stand:$PATH
DDIR=/

if [ -f bindist.aa ] ; then
	# Temporary kludge for pathological bindist.
	if [ -f $DDIR/etc/myname ]; then
		cp $DDIR/etc/hosts $DDIR/etc/myname $DDIR/stand/etc
	fi
	if [ -f $DDIR/etc/defaultrouter ]; then
		cp $DDIR/etc/defaultrouter $DDIR/stand/etc
	fi
	echo; echo "Extracting bindist, please wait." 
	cat bindist.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
	if [ -f $DDIR/stand/etc/myname ]; then
		# Add back what the bindist nuked.
		cp $DDIR/stand/etc/myname $DDIR/etc
		cat $DDIR/stand/etc/hosts >> $DDIR/etc/hosts
	fi
	if [ -f $DDIR/stand/etc/defaultrouter ]; then
		cp $DDIR/stand/etc/defaultrouter $DDIR/etc
	fi
fi

for i in *.aa
do
	b=`basename $i .aa`
	if [ "$b" != bin_tgz ] ; then
		if [ "$b" = des ] ; then
			# We cannot replace /sbin/init while it runs
			# so move it out of the way for now
			mv /sbin/init /sbin/non_des_init
		fi
		echo "Extracting $b"
		cat $b.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
	fi
done