-
Notifications
You must be signed in to change notification settings - Fork 13
/
mklive-image.sh
executable file
·57 lines (49 loc) · 1.14 KB
/
mklive-image.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
#!/bin/sh
#
# Convenience script for generating different kinds of live images
# all extra arguments are passed to mklive.sh as is
#
# Copyright 2022 q66 <q66@chimera-linux.org>
#
# License: BSD-2-Clause
#
IMAGE=
EXTRA_PKGS=
KERNEL_PKGS=
while getopts "b:k:p:" opt; do
case "$opt" in
b) IMAGE="$OPTARG";;
k) KERNEL_PKGS="$OPTARG";;
p) EXTRA_PKGS="$OPTARG";;
*) ;;
esac
done
shift $((OPTIND - 1))
if [ -z "$KERNEL_PKGS" ]; then
KERNEL_PKGS="linux-stable"
if [ "$IMAGE" != "minimal" ]; then
KERNEL_PKGS="$KERNEL_PKGS linux-stable-zfs-bin"
fi
fi
readonly BASE_PKGS="base-full base-live ${KERNEL_PKGS} ${EXTRA_PKGS}"
case "$IMAGE" in
minimal)
PKGS="base-minimal base-full-kernel ${KERNEL_PKGS} ${EXTRA_PKGS}"
;;
base)
PKGS="${BASE_PKGS}"
;;
gnome)
PKGS="${BASE_PKGS} gnome"
;;
plasma)
PKGS="${BASE_PKGS} plasma-desktop xserver-xorg"
;;
*)
echo "unknown image type: $IMAGE"
echo
echo "supported image types: base gnome plasma"
exit 1
;;
esac
./mklive.sh -p "$PKGS" -f "$IMAGE" "$@"