-
Notifications
You must be signed in to change notification settings - Fork 13
/
universal_image_generator_berryboot.sh
140 lines (128 loc) · 2.98 KB
/
universal_image_generator_berryboot.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
# Universal Image Generator for Berryboot
# Copyright 2018-2021 Alexander G.
# https://www.alexgoldcheidt.com
# https://github.com/agoldcheidt
if [ "$EUID" -ne 0 ]
then
echo 1>&2 "Please run as root"
exit 1
fi
#date
date=$(date +"%d-%b-%Y")
sleep 1
clear
#Some artwork...
echo "-------------------------------------------------";
echo " ___ ___ ";
echo " | _ ) ___ _ _ _ _ _ _/ __| ___ _ ___ _____ _ _ ";
echo " | _ \/ -_) '_| '_| || \__ \/ -_) '_\ V / -_) '_|";
echo " |___/\___|_| |_| \_, |___/\___|_| \_/\___|_| ";
echo " 2021.03.10 |__/ ";
echo "-------------------------------------------------";
echo ""
echo "#### INSTALLING DEPENDENCIES ####"
echo ""
#OS Menu Selection
PS3='Please select your current OS: '
options=("Debian/Ubuntu" "CentOS" "Fedora" "ArchLinux" "Skip")
select opt in "${options[@]}"
do
case $opt in
"Debian/Ubuntu")
echo ""
echo "#### INSTALLING ARIA2/SQUASHFS-TOOLS ####"
echo ""
#installing packages
sudo apt-get update && sudo apt-get install aria2 squashfs-tools bsdtar -y
echo ""
echo "#### DONE! ####"
echo ""
sleep 1
clear
break
;;
"CentOS")
echo ""
echo "#### INSTALLING ARIA2/SQUASHFS-TOOLS ####"
echo ""
#installing packages
sudo yum install aria2 squashfs-tools bsdtar -y
echo ""
echo "#### DONE! ####"
echo ""
sleep 1
clear
break
;;
"Fedora")
echo ""
echo "#### INSTALLING ARIA2/SQUASHFS-TOOLS ####"
echo ""
#installing packages
sudo dnf install aria2 squashfs-tools bsdtar -y
echo ""
echo "#### DONE! ####"
echo ""
sleep 1
clear
break
;;
"ArchLinux")
echo ""
echo "#### INSTALLING ARIA2/SQUASHFS-TOOLS ####"
echo ""
#installing packages
pacman -Syy --noconfirm aria2 squashfs-tools bsdtar --force
echo ""
echo "#### DONE! ####"
echo ""
sleep 1
clear
break
;;
"Skip")
break
;;
*) echo invalid option;;
esac
done
sleep 1
clear
echo "-----------------------------------------------";
echo " ___ ___ ___ _ _ _ ";
echo " / _ \/ __| / __| ___| |___ __| |_(_)___ _ _ ";
echo " | (_) \__ \ \__ \/ -_) / -_) _| _| / _ \ ' \ ";
echo " \___/|___/ |___/\___|_\___\__|\__|_\___/_||_|";
echo " ";
echo "-----------------------------------------------";
echo ""
echo "#### OPERATING SYSTEM SELECTION ####"
echo ""
#OS Menu Selection
PS3='Please select the OS: '
options=("ArchLinux ARM" "LibreELEC" "Raspberry Pi OS" "Exit")
select opt in "${options[@]}"
do
case $opt in
"LibreELEC")
#Starting LibreELEC Script
bash <(wget -qO- https://git.io/fx6Zc)
break
;;
"ArchLinux ARM")
#Starting ArchLinux ARM Script
bash <(wget -qO- https://git.io/JqZD0)
break
;;
"Raspberry Pi OS")
#Starting Raspberry Pi OS Script
bash <(wget -qO- https://git.io/JqCLj)
break
;;
"Exit")
break
;;
*) echo invalid option;;
esac
done