-
Notifications
You must be signed in to change notification settings - Fork 3
/
make_binary
executable file
·47 lines (42 loc) · 1.35 KB
/
make_binary
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
#!/bin/sh
set -e
version=`awk '/VERSION/ {print $3}' version.h | tr -d '"'`
if [ -f bootstrap/amiga/amiboot ]; then
echo "Creating amiboot-$version.gz"
install -m644 bootstrap/amiga/amiboot ../amiboot-$version
gzip -9f ../amiboot-$version
fi
if [ -f bootstrap/atari/ataboot.ttp ]; then
echo "Creating ataboot-$version.gz"
install -m644 bootstrap/atari/ataboot.ttp ../ataboot-$version
gzip -9f ../ataboot-$version
fi
for mach in amiga atari; do
if [ -f lilo/$mach/lilo ]; then
echo "Creating $mach-lilo-$version.tar.gz"
rm -rf tmp
mkdir -p tmp/{etc,sbin,boot}
mkdir -p tmp/usr/{man/man8,doc/m68kboot,lib/m68kboot,info}
install -m755 lilo/$mach/lilo tmp/sbin
install -m755 lilo/$mach/dumpmapfile tmp/sbin
install -m644 lilo/$mach/loader tmp/boot/loader.$mach
install -m644 lilo/$mach/lilo.conf.example tmp/etc
install -m644 doc/lilo.8 tmp/usr/man/man8
for docfile in lilo.txt lilo.dvi lilo.ps; do
if [ -f doc/$docfile ]; then
install -m644 doc/$docfile tmp/usr/doc/m68kboot
fi
done
if [ -f doc/lilo.info ]; then
install -m644 doc/lilo.info tmp/usr/info
fi
if [ "$mach" = atari ]; then
install -m755 lilo/atari/bootos tmp/sbin
install -m644 lilo/atari/bootflags.cpx/bootflag.cpx tmp/usr/lib/m68kboot
fi
(cd tmp; tar cf ../../$mach-lilo-$version.tar *)
gzip -9f ../$mach-lilo-$version.tar
rm -rf tmp
fi
done
exit 0