summaryrefslogtreecommitdiffstats
path: root/release/picobsd/build/populate
blob: 14d54ff66b157bd1fe3305b530dff57ea8407c2d (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
#
#	$Id: populate,v 1.9 1999/02/12 20:35:08 abial Exp $
#

. ../Version

pwd=`pwd`

echo "-> Populating MFS tree..."
cd ../${TYPE}/mfs.tree
make
if [ X"${NO_DEVFS}" != X"" ]
then
	make devnodes
fi
if [ "X$?" != "X0" ]
then
	echo "-> ERROR while making \"${TYPE}\" hierarchy in /mnt..."
	echo "-> Aborting $0"
	exit 10
fi
if [ "${TYPE}" = "router" ]
then
	cat ../lang/mfs.rc.${LANGUAGE}| \
		sed -e "s/@VER@/${VER}/g" > \
		/mnt/etc/oinit.rc
else
	cat ../lang/mfs.rc.${LANGUAGE} | \
		sed -e "s/@VER@/${VER}/g" > \
		/mnt/etc/rc
	cp login.conf /mnt/etc/login.conf
	cat ../lang/README.${LANGUAGE} | \
		sed -e "s/@VER@/${VER}/g" > \
		/mnt/README
fi
cp ../lang/update.${LANGUAGE} /mnt/stand/update
if [ "${TYPE}" = "dial" ]
then
	cp ../lang/reboot.${LANGUAGE} /mnt/stand/reboot
	ln -f /mnt/stand/reboot /mnt/stand/shutdown
	cp ../lang/login.${LANGUAGE} /mnt/stand/login
	cp ../lang/dialup.${LANGUAGE} /mnt/stand/dialup
	(cd ../../help;\
	rm -rf tmp_hlp;\
	mkdir tmp_hlp;\
	for i in `ls *.hlp.${LANGUAGE}`;\
	do \
		cp $i tmp_hlp/`basename $i .hlp.${LANGUAGE}`;\
	done;\
	cd tmp_hlp;\
	ar -cru help.a *;\
	cp help.a /mnt/help.a)
fi

echo "-> Making and installing crunch1..."
cd ../crunch1
make "SRC=${SRC}" && make install 2>&1 >/dev/null
if [ "X$?" != "X0" ]
then
	echo "-> ERROR while building ../${TYPE}/crunch1..."
	echo "-> Aborting $0"
	exit 10
fi

cd ${pwd}

(echo "-> Fixing permissions"; cd /mnt; chown -R root *)
OpenPOWER on IntegriCloud