Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 79 lines (61 sloc) 1.851 kB
51f1296 @kaihendry config seems to work
kaihendry authored
1 #!/bin/sh -e
2 . $(dirname $0)/config
221df29 @kaihendry clean up
kaihendry authored
3 NAME=$1
4 TYPE=$(echo $NAME | awk -F . '{print $1}')
51f1296 @kaihendry config seems to work
kaihendry authored
5 TEMPDIR="$(mktemp -d -t $NAME.XXXXXXXX)" || exit 1
4325a61 @kaihendry initial
kaihendry authored
6
30f4a62 @kaihendry revised
kaihendry authored
7 if test "$(id -u)" -ne "0"
8 then
51f1296 @kaihendry config seems to work
kaihendry authored
9 echo "Super user required :-)" >&2
30f4a62 @kaihendry revised
kaihendry authored
10 exit 1
11 fi
12
4325a61 @kaihendry initial
kaihendry authored
13 mailerror () {
1e08206 @kaihendry hetty
kaihendry authored
14 echo BUILD FAILED at $NAME
be0b511 @kaihendry tweak
kaihendry authored
15 echo "$LOG" |
221df29 @kaihendry clean up
kaihendry authored
16 mail -a 'From: hendry@webconverger.com' -s "failed" kai.hendry@gmail.com
4325a61 @kaihendry initial
kaihendry authored
17 exit 1
18 }
19
221df29 @kaihendry clean up
kaihendry authored
20 if test ! $DEBUG # Whilst debugging we might want to inspect the detritus
1a8a2ea @kaihendry build binary
kaihendry authored
21 then
22 trap "cd $TEMPDIR/config-webc/$TYPE; lh clean --purge; rm -vrf $TEMPDIR" 0 1 2 3 9 15
23 fi
4325a61 @kaihendry initial
kaihendry authored
24
221df29 @kaihendry clean up
kaihendry authored
25 chmod a+rx $TEMPDIR && cd $TEMPDIR
4325a61 @kaihendry initial
kaihendry authored
26
221df29 @kaihendry clean up
kaihendry authored
27 mount # To check in case /proc is mounted already
1a8a2ea @kaihendry build binary
kaihendry authored
28
221df29 @kaihendry clean up
kaihendry authored
29 echo Live Helper Version:
30 dpkg --status live-helper | egrep "^Version" | awk '{print $2}'
1a8a2ea @kaihendry build binary
kaihendry authored
31
221df29 @kaihendry clean up
kaihendry authored
32 # To check what version our sources are
c01215f @kaihendry suggestions from lamby and SynrG added
kaihendry authored
33 wget -q -O- http://${MIRROR}/debian/project/trace/ftp-master.debian.org
34
221df29 @kaihendry clean up
kaihendry authored
35 # Live helper configuration (Webconverger)
4d00cfc @kaihendry Works for mini. Need to clean up index.cgi
kaihendry authored
36 git clone git://git.debian.org/git/debian-live/config-webc.git
1e08206 @kaihendry hetty
kaihendry authored
37
4d00cfc @kaihendry Works for mini. Need to clean up index.cgi
kaihendry authored
38 cd config-webc/$TYPE
c01215f @kaihendry suggestions from lamby and SynrG added
kaihendry authored
39
1e08206 @kaihendry hetty
kaihendry authored
40 if test $HOSTNAME = "hetty"
41 then
42 git checkout -b hetty origin/hetty
43 fi
44
c01215f @kaihendry suggestions from lamby and SynrG added
kaihendry authored
45 find config/ -type f | while read FILENAME
46 do
47 while read LINE
48 do
49 echo "${FILENAME}:${LINE}"
50 done < $FILENAME
51 done
52
1a8a2ea @kaihendry build binary
kaihendry authored
53 echo "Building default (ISO)"
dfb9d29 @kaihendry sudo not required in build.sh
kaihendry authored
54 time lh build || mailerror
30f4a62 @kaihendry revised
kaihendry authored
55
221df29 @kaihendry clean up
kaihendry authored
56 ls -lah # Move build into output directory
1e08206 @kaihendry hetty
kaihendry authored
57 for f in binary.*; do mv "$f" "$OUTPUT/$NAME.${f##*.}"; done
b2302fd @kaihendry Cleaner cut
kaihendry authored
58
221df29 @kaihendry clean up
kaihendry authored
59 if test $USB
60 then
61 # Lets build USB now too
62 sed -i 's/\(^LH_BOOTLOADER.*\)/#\1/' config/binary
63 echo 'LH_BINARY_IMAGES="usb-hdd"' >> config/binary
64 sed -i 's/\(^LH_SOURCE.*\)/#\1/' config/source # we've compiled sources already by default
65 lh clean --binary
66
67 echo "Building USB image"
68 time lh binary || mailerror
69 ls -lah
70 for f in binary.*; do mv "$f" "$OUTPUT/$NAME.${f##*.}"; done
71 fi
1a8a2ea @kaihendry build binary
kaihendry authored
72
221df29 @kaihendry clean up
kaihendry authored
73 if test -e source.tar.gz # If LH_SOURCE is enabled
1e08206 @kaihendry hetty
kaihendry authored
74 then
75 mv source.tar.gz "$OUTPUT/$NAME.tar.gz"
76 fi
1a8a2ea @kaihendry build binary
kaihendry authored
77
1e08206 @kaihendry hetty
kaihendry authored
78 chown -R www-data:www-data $OUTPUT
Something went wrong with that request. Please try again.