Skip to content
Newer
Older
100755 64 lines (48 sloc) 1.54 KB
4d00cfc @kaihendry Works for mini. Need to clean up index.cgi
kaihendry authored
1 #!/bin/sh -e
2 TYPE="mini"
e4f8339 @kaihendry Still not working ...
kaihendry authored
3 MIRROR="ftp.egr.msu.edu"
4d00cfc @kaihendry Works for mini. Need to clean up index.cgi
kaihendry authored
4 TEMPDIR="$(mktemp -d -t live.XXXXXXXX)" || exit 1
1a8a2ea @kaihendry build binary
kaihendry authored
5 NAME=$TYPE.$(date --iso-8601=minutes)
4325a61 @kaihendry initial
kaihendry authored
6
30f4a62 @kaihendry revised
kaihendry authored
7 if test "$(id -u)" -ne "0"
8 then
9 echo "not root" >&2
10 exit 1
11 fi
12
4325a61 @kaihendry initial
kaihendry authored
13 mailerror () {
4d00cfc @kaihendry Works for mini. Need to clean up index.cgi
kaihendry authored
14 echo BUILD FAILED at $(date)
b2302fd @kaihendry Cleaner cut
kaihendry authored
15 echo "http://build.webconverger.com/logs/$NAME.txt" | mail -a 'From: build.webconverger.com <hendry@webconverger.com>' -s "failed" kai.hendry@gmail.com
4325a61 @kaihendry initial
kaihendry authored
16 exit 1
17 }
18
1a8a2ea @kaihendry build binary
kaihendry authored
19 if test ! $DEBUG
20 then
21 trap "cd $TEMPDIR/config-webc/$TYPE; lh clean --purge; rm -vrf $TEMPDIR" 0 1 2 3 9 15
22 fi
4325a61 @kaihendry initial
kaihendry authored
23
14be2ce @kaihendry Little improvements
kaihendry authored
24 chmod a+rx $TEMPDIR
4325a61 @kaihendry initial
kaihendry authored
25 cd $TEMPDIR
26
1a8a2ea @kaihendry build binary
kaihendry authored
27 mount # For debugging (in case /proc is mounted already)
28
c01215f @kaihendry suggestions from lamby and SynrG added
kaihendry authored
29 lh --version | head -n1
1a8a2ea @kaihendry build binary
kaihendry authored
30 dpkg -l live-helper
31
c01215f @kaihendry suggestions from lamby and SynrG added
kaihendry authored
32 wget -q -O- http://${MIRROR}/debian/project/trace/ftp-master.debian.org
33
4d00cfc @kaihendry Works for mini. Need to clean up index.cgi
kaihendry authored
34 git clone git://git.debian.org/git/debian-live/config-webc.git
35 cd config-webc/$TYPE
c01215f @kaihendry suggestions from lamby and SynrG added
kaihendry authored
36
37 find config/ -type f | while read FILENAME
38 do
39 while read LINE
40 do
41 echo "${FILENAME}:${LINE}"
42 done < $FILENAME
43 done
44
1a8a2ea @kaihendry build binary
kaihendry authored
45 echo "Building default (ISO)"
dfb9d29 @kaihendry sudo not required in build.sh
kaihendry authored
46 time lh build || mailerror
30f4a62 @kaihendry revised
kaihendry authored
47
b2302fd @kaihendry Cleaner cut
kaihendry authored
48 ls -lah
1a8a2ea @kaihendry build binary
kaihendry authored
49 for f in binary.*; do mv "$f" "/srv/web/build.webconverger.com/imgs/$NAME.${f##*.}"; done
b2302fd @kaihendry Cleaner cut
kaihendry authored
50
1a8a2ea @kaihendry build binary
kaihendry authored
51 # Lets build USB now too
52 sed -i 's/\(^LH_BOOTLOADER.*\)/#\1/' config/binary
53 echo 'LH_BINARY_IMAGES="usb-hdd"' >> config/binary
54 sed -i 's/\(^LH_SOURCE.*\)/#\1/' config/source # we've compiled sources already by default
55 lh clean --binary
56
57 echo "Building USB image"
58 time lh binary || mailerror
59
60 ls -lah
b2302fd @kaihendry Cleaner cut
kaihendry authored
61 for f in binary.*; do mv "$f" "/srv/web/build.webconverger.com/imgs/$NAME.${f##*.}"; done
1a8a2ea @kaihendry build binary
kaihendry authored
62
b2302fd @kaihendry Cleaner cut
kaihendry authored
63 mv source.tar.gz "/srv/web/build.webconverger.com/imgs/$NAME.tar.gz"
Something went wrong with that request. Please try again.