-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake-userland
executable file
·102 lines (91 loc) · 2.34 KB
/
make-userland
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/sh
## $Id: make-userland,v 1.1 2002/12/05 17:04:15 yozo Exp $
## make-userland script
## if you wanna record the output, type
## (make-userland >& logfile) &
## and see logfile.
## -- yozo. Thu Mar 22 18:18:27 JST 2001
##
## starting messages beautified -- yozo. Thu Apr 26 16:23:52 JST 2001
## beautified a little more -- yozo. Thu May 10 11:33:33 JST 2001
## kerberosV added -- yozo. Tue Aug 28 18:47:00 JST 2001
PATH=/sbin:/usr/sbin:/bin:/usr/bin
LOGDIR=/usr/local/tmp
SRCDIR=/usr/src
OBJDIR=/usr/obj
EXISTS_OBJDIR="YES" ## assumes obj dir by default
echo -n "$0: "
date
echo -n "$0: "
uname -a
echo
ls -alt ${LOGDIR}
df -k
echo
if [ -d ${SRCDIR} ] ; then
echo "$0: ${SRCDIR} exists."
else
echo "$0: ${SRCDIR} does not exist. check it."
exit 10
fi
#### move to obj directory if exists.
if [ -d ${OBJDIR} ] ; then
echo "$0: ${OBJDIR} exists."
cd ${OBJDIR}
echo -n "$0: current dir is "
pwd
ls -aFl
echo "$0: disk usage(du -sk *)"
du -sk *
echo
if [ -d OLD ] ; then
echo "$0: ${OBJDIR}/OLD exists. remove this before executing me."
exit 20
fi
echo "$0: start cleaning now..."
mkdir OLD
mv bin distrib games gnu kerberosIV kerberosV lib libexec regress sbin share usr.bin usr.sbin OLD
echo "$0: removing OLD directory in background."
rm -rf OLD &
ls -aFl
else
echo "$0: ${OBJDIR} does not exist. in-place compilation progressing..."
EXISTS_OBJDIR="NO"
fi
echo
#### move to src directory
cd ${SRCDIR}
echo -n "$0: current dir is "
pwd
ls -aFl
echo -n "$0: disk usage(du -sk .) -- "
du -sk .
echo
echo "$0: head Makefile ======"
head Makefile
echo "$0: head Makefile ======"
echo
if [ X${EXISTS_OBJDIR} = XYES ]; then
echo -n "$0: \"make obj\" and \"make build\" start..."
date
make obj && make build
date
elif [ X${EXISTS_OBJDIR} = XNO ]; then
echo -n "$0: \"make build\" start..."
date
make build
date
fi
echo -n "$0: current dir is "
pwd
echo -n "$0: disk usage(du -sk .) -- "
du -sk .
df -k
echo
echo "$0: userland compilation finished."
echo "$0: upgrade files in /etc, /dev, /var etc. manually."
echo "$0: for this final task, do"
echo "$0: \"cd /usr/src/etc && make DESTDIR=/tmp/dist distribution-etc-root-var\""
echo "$0: to install new files under /tmp/dist/, then compare them with /etc/, /var/ etc."
echo "$0: execute /dev/MAKEDEV to make new device files if necessary."
## end_of_file.