blob: 306af81b817b70cd1170843ae3740fecd69176f2 (
plain)
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
|
#!/bin/bash
. config/bootstrap
bit=32
[ "$LH_ARCHITECTURE" = "amd64" ] && bit=64
# Update kanotix-version (32/64-bit and timestamp)
perl -pi -e "s%(Kanotix|Excalibur|Hellfire)(32|64)%\${1}$bit%i; s%(32|64)(bit)%$bit\${2}%i; s|[0-9]+-[0-9]+:[0-9]+|$(date +%Y%m%d-%H:%M)|" config/chroot_local-includes/etc/kanotix-version
if [ -d tmpfs ]; then
# build using tmpfs
if [ -z "$(stat --printf "%d\n" . tmpfs | uniq -u)" ]; then
# tmpfs not mounted yet
options=defaults
[ -f tmpfs/options ] && options="$(<tmpfs/options)"
mount -t tmpfs -o "$options" tmpfs tmpfs
fi
cd tmpfs
# delete everything except cache
find . -maxdepth 1 ! -name cache -exec rm -r '{}' \; 2>/dev/null
# copy everything to tmpfs
rsync -a .. . --exclude=tmpfs
# build
lh build noauto ${@} 2>&1 | tee binary.log
cd ..
# prevent parent lh build (the "auto" one) from building again
exit 1
else
lh build noauto ${@} 2>&1 | tee binary.log
fi
|