-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·50 lines (42 loc) · 996 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·50 lines (42 loc) · 996 Bytes
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
#!/usr/bin/env bash
function log_fatal {
echo "$1" >&2
exit 1
}
function log_error {
echo "$1" >&2
}
function tinyfetch() {
"$(dirname "$(readlink -f "$0")")"/.local/bin/tinyfetch "$@"
}
function main() {
echo "Starting automated installation..."
os=$(tinyfetch -o 2>/dev/null)
case $os in
fedora-silverblue)
echo "Installing Fedora Silverblue setup..."
make fedora-silverblue --no-print-directory || return $?
;;
fedora-workstation)
echo "Installing Fedora Workstation setup..."
make fedora-workstation --no-print-directory || return $?
;;
github-codespaces | github-ubuntu)
echo "Installing GitHub Codespaces setup..."
make github-codespaces --no-print-directory || return $?
;;
macos)
echo "Installing macOS setup..."
make macos --no-print-directory || return $?
;;
ubuntu)
echo "Installing Ubuntu setup..."
make ubuntu --no-print-directory || return $?
;;
*)
log_fatal "Unsupported OS ($(tinyfetch))."
;;
esac
echo "Done."
}
main "$@"