forked from void-linux/void-mklive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-x86-images.sh.in
78 lines (69 loc) · 2.21 KB
/
build-x86-images.sh.in
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/sh
set -eu
ARCH=$(uname -m)
IMAGES="base enlightenment xfce mate cinnamon gnome kde lxde lxqt"
REPO=
DATE=$(date +%Y%m%d)
help() {
echo "${0#/*}: [-a arch] [-b base|enlightenment|xfce|mate|cinnamon|gnome|kde|lxde|lxqt] [-r repo]" >&2
}
while getopts "a:b:hr:" opt; do
case $opt in
a) ARCH="$OPTARG";;
b) IMAGES="$OPTARG";;
h) help; exit 0;;
r) REPO="-r $OPTARG $REPO";;
*) help; exit 1;;
esac
done
shift $((OPTIND - 1))
build_variant() {
variant="$1"
IMG_SUFFIX="-$variant"
if [ "$variant" = base ]; then
IMG_SUFFIX=
fi
IMG=void-live-${ARCH}-${DATE}${IMG_SUFFIX}.iso
GRUB_PKGS="grub-i386-efi grub-x86_64-efi"
PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse $GRUB_PKGS"
XORG_PKGS="xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf alsa-plugins-pulseaudio"
case $variant in
base) ;;
enlightenment)
PKGS="$PKGS $XORG_PKGS lxdm enlightenment terminology udisks2 firefox-esr"
;;
xfce)
PKGS="$PKGS $XORG_PKGS lxdm xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
;;
mate)
PKGS="$PKGS $XORG_PKGS lxdm mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
;;
cinnamon)
PKGS="$PKGS $XORG_PKGS lxdm cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
;;
gnome)
PKGS="$PKGS $XORG_PKGS gnome firefox-esr"
;;
kde)
PKGS="$PKGS $XORG_PKGS kde5 konsole firefox-esr dolphin"
;;
lxde)
PKGS="$PKGS $XORG_PKGS lxde lxdm gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr"
;;
lxqt)
PKGS="$PKGS $XORG_PKGS lxqt lxdm gvfs-afc gvfs-mtp gvfs-smb udisks2 qupzilla"
;;
*)
>&2 echo "Unknown variant $variant"
exit 1
;;
esac
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" ${REPO} "$@"
}
if [ ! -x mklive.sh ]; then
echo mklive.sh not found >&2
exit 1
fi
for image in $IMAGES; do
build_variant "$image"
done