-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
64 lines (51 loc) · 1002 Bytes
/
build.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
56
57
58
59
60
61
62
63
#!/bin/sh
#Package required:
# gcc
# gcc-multilib
# upx
# nasm
# autogen
build_grub4dos() {
if [ ! -d "grub4dos" ]; then
git clone https://github.com/chenall/grub4dos.git grub4dos
fi
cd grub4dos
git branch | grep build > /dev/null
if [ $? -ne 0 ]; then
git checkout -b build c34d9a45eae07587a88b316d74667c9fbcdebc50
fi
./autogen.sh && ./configure && make
cd -
}
release_grub4dos() {
TEMP=`tempfile`
cat << EOF > $TEMP
ChangeLog
ChangeLog_GRUB4DOS.txt
ChangeLog_chenall.txt
README
COPYING
README_GRUB4DOS.txt
README_GRUB4DOS_CN.txt
stage2/badgrub.exe
stage2/bootlace.com
stage2/eltorito.sys
stage2/grldr
stage2/grldr.mbr
stage2/grldr.pbr
stage2/grldr_cd.bin
stage2/grub.exe
stage2/hmload.com
ipxegrldr.ipxe
config.sys
default
menu.lst
EOF
mkdir -p dist
rsync --files-from=$TEMP grub4dos dist
}
case $1 in
build) build_grub4dos;;
release) release_grub4dos;;
*) build_grub4dos && release_grub4dos;;
esac