-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·45 lines (36 loc) · 1.03 KB
/
install.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
#!/usr/bin/env bash
set -euox pipefail
install_appimages() {
# Write appimages to /etc/appimages-install.json to install on first boot.
jq -r '.appimages' config.json > /etc/appimages-install.json
}
install_flatpaks() {
# Write flatpaks to /etc/flatpak.install to install on first boot.
jq -r '.flatpaks[]' config.json > /etc/flatpak.install
}
install_github_releases() {
for RELEASE in $(jq -c '.github_releases[]' config.json)
do
PROJECT=$(echo "$RELEASE" | jq -r '.project')
ARCH=$(echo "$RELEASE" | jq -r '.arch')
/tmp/github-release-install.sh "$PROJECT" "$ARCH"
done
}
install_packages() {
PACKAGES=$(jq -r '.packages.install | join(" ")' config.json)
rpm-ostree install $PACKAGES
}
remove_packages() {
PACKAGES=$(jq -r '.packages.remove | join(" ")' config.json)
rpm-ostree override remove $PACKAGES
}
setup() {
# Install desired appimages, flatpaks, & packages
install_appimages
install_flatpaks
install_github_releases
install_packages
# Remove undesired packages
remove_packages
}
setup