-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.sh
executable file
·78 lines (59 loc) · 1.79 KB
/
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
#set -x
source settings
ARCHISO_PROFILE=groovyarcade
AI_DIR=/work/"$ARCHISO_PROFILE"
ISO_NAME="GA_$(date +%Y.%m)"
apply_overlay() {
# Read the kernel default command line from globals
dflt_cmdline="$(grep KERNEL_DEFAULT_CMDLINE globals | cut -d '=' -f2-)"
# BIOS syslinux only hack
syslinuxcfg="$(LABEL=$ISO_NAME KRNL_CMDLINE="$dflt_cmdline" envsubst '${LABEL} ${KRNL_CMDLINE}' < /work/groovyarcade/syslinux/syslinux.cfg)"
#LABEL=$ISO_NAME envsubst '${LABEL}' < /work/overlay/syslinux/syslinux.cfg > "$AI_DIR"/syslinux/syslinux.cfg
echo "$syslinuxcfg" > "$AI_DIR"/syslinux/syslinux.cfg
# UEFI syslinux only hack
for f in "$AI_DIR"/efiboot/loader/entries/*.conf ; do
entry="$(KRNL_CMDLINE="$dflt_cmdline" envsubst '${KRNL_CMDLINE}' < "$f")"
echo "$entry" > "$f"
done
}
customize_archiso() {
mkdir -p "$AI_DIR"/airootfs/etc/pacman.d/
cp groovy-ux-repo.conf "$AI_DIR"/airootfs/etc/pacman.d/
cp groovy-ux-repo.conf /etc/pacman.d/
}
start_iso_build() {
mkarchiso -v \
-o /work/output \
-L "$ISO_NAME" \
-A "GroovyArcade Install DVD" \
-w /work/fakeroot \
-D groovyarcade \
"$AI_DIR"
}
enable_testing_repo() {
sed -Ei '1,3s/^#(.*)/\1/g' groovy-ux-repo.conf
}
use_git_pkg() {
pkg_to_rename="gatools gasetup galauncher"
for pkg in $pkg_to_rename ; do
sed -i "s/^${pkg}$/${pkg}-git/g" "$AI_DIR"/packages.x86_64
done
}
main() {
# Enable the testing repo for non stable versions
if [[ $GA_VERSION != master && ! $GA_VERSION =~ [0-9]{4}\.[0-9]{2} ]] ; then
echo "Enabling the testing repo and packages"
use_git_pkg
enable_testing_repo
fi
# Sync overlay
apply_overlay
# patch archiso build.sh for custom pacman.conf
customize_archiso
# Banzai!
start_iso_build
# Get the packages list
cp /work/fakeroot/iso/groovyarcade/pkglist.x86_64.txt /work/output
}
main