generated from blue-build/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_minimalblue_iso.sh
executable file
·102 lines (85 loc) · 3.45 KB
/
generate_minimalblue_iso.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/env bash
if ! command -v podman &> /dev/null
then
echo "Podman is not installed, install it to use this script."
exit 1
fi
function is_yes {
case $(echo "$1" | tr '[:upper:]' '[:lower:]') in
y|yes) return 0;;
*) return 1;;
esac
}
# Define image configurations
#declare -A image_configs=(
# ["server"]="Server"
# ["server-zfs"]="Server"
# ["silverblue"]="Silverblue:asus"
# ["kinoite"]="Kinoite:asus"
# ["bluefin"]="Silverblue:dx"
# ["sericea"]="Sericea"
# ["wayblue-wayfire"]="Sericea"
# ["wayblue-sway"]="Sericea"
# ["wayblue-river"]="Sericea"
# ["wayblue-hyprland"]="Sericea"
# ["cinnamon"]="Silverblue"
# ["aurora"]="Kinoite:dx:asus:surface"
# ["cosmic"]="Kinoite"
#)
#image_name=""
#additional_params=""
#variant=""
# Determine if it's a server or desktop
#read -p "Is this for a server? (yes/No): " is_server
#if is_yes "$is_server"; then
# read -p "Do you need ZFS support? (yes/No): " use_zfs
# image_name=$(is_yes "$use_zfs" && echo "server-zfs" || echo "server")
# variant=${image_configs[$image_name]}
#else
# For desktops, present all non-server options
# desktop_options=($(for key in "${!image_configs[@]}"; do [[ $key != server* ]] && echo "$key"; done | sort))
# echo "Select a desktop:"
# select opt in "${desktop_options[@]}"; do
# if [[ " ${desktop_options[@]} " =~ " ${opt} " ]]; then
# image_name=$opt
# IFS=':' read -r variant options <<< "${image_configs[$opt]}"
# break
# else
# echo "Invalid option"
# fi
# done
# Ask specific questions based on the chosen desktop
# if [[ $options == *"dx"* ]]; then
# read -p "Do you need Developer Experience (dx)? (yes/No): " use_dx
# is_yes "$use_dx" && additional_params+="-dx"
# fi
# if [[ $options == *"asus"* ]]; then
# read -p "Do you use an Asus laptop? (yes/No): " is_asus
# is_yes "$is_asus" && additional_params+="-asus"
# fi
# if [[ $options == *"surface"* && $additional_params != *"-asus"* ]]; then
# read -p "Do you use a Microsoft Surface device? (yes/No): " is_surface
# is_yes "$is_surface" && additional_params+="-surface"
# fi
#fi
# Ask about Nvidia for all options
#read -p "Do you use Nvidia? (yes/No): " use_nvidia
#is_yes "$use_nvidia" && additional_params+="-nvidia" || additional_params+="-main"
# Ask about user namespaces for all options
#read -p "Do you need user namespaces? (yes/No): " use_userns
#is_yes "$use_userns" && additional_params+="-userns"
#image_name+="$additional_params-hardened"
image_name="minimalblue-lxqt-main-userns-hardened"
#command="sudo podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest IMAGE_REPO=ghcr.io/secureblue IMAGE_NAME=$image_name VERSION=40 IMAGE_TAG=latest VARIANT=$variant"
command="sudo podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest IMAGE_REPO=ghcr.io/toothytoad IMAGE_NAME=$image_name VERSION=40 IMAGE_TAG=latest VARIANT=ulxqt"
#ghcr.io/toothytoad/minimalblue-lxqt-main-userns-hardened:latest
echo "Command to execute:"
echo "$command"
echo ""
read -p "Generate this ISO? (yes/No): " generate_iso
if is_yes "$generate_iso"; then
$command
mv deploy.iso $image_name.iso
mv deploy.iso-CHECKSUM $image_name.iso-CHECKSUM
sed -i "s/deploy.iso/$image_name.iso/" "$image_name.iso-CHECKSUM"
fi