-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep2.sh
55 lines (50 loc) · 1.14 KB
/
step2.sh
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
: Step 2 - install the files
: assuming we have a backup
if [ "$#" -eq 0 ]; then
echo 'Call this script with the base address of your system source - perhaps /usr/sys'
exit
fi
SYS=$1
: use this as a flag to suppress update of /usr/include
INCLUDE=""
if [ "$SYS" = "/usr/sys" ]; then
INCLUDE=/usr/include
fi
echo '*** Step 2: Installing replacement files'
DEST=$SYS/dev
for name in dc.c dh.c dz.c kl.c tty.c; do
if [ -f $DEST/orig/$name ]; then
cp $name $DEST
else
echo "No backup for $DEST/$name - not installed"
fi
done
echo "*** $SYS/dev updated"
DEST=$SYS/h
cp deftty.h $DEST
for name in tty.h pk.p; do
if [ -f $DEST/orig/$name ]; then
cp $name $DEST
else
echo "No backup for $DEST/$name - not installed"
fi
done
if [ "$INCLUDE" != "" ]; then
DEST=$INCLUDE
for name in sgtty.h; do
if [ -f $DEST/orig/$name ]; then
cp $name $DEST
else
echo "No backup for $DEST/$name - not installed"
fi
done
DEST=$INCLUDE/sys
cp deftty.h $DEST
for name in tty.h pk.p; do
if [ -f $DEST/orig/$name ]; then
cp $name $DEST
else
echo "No backup for $DEST/$name - not installed"
fi
done
fi