-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlauncher.sh
More file actions
59 lines (51 loc) · 1.24 KB
/
launcher.sh
File metadata and controls
59 lines (51 loc) · 1.24 KB
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
#!/bin/sh
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
NOCOLOR='\033[0m'
error() {
printf "${RED}$1${NOCOLOR}\n"
}
warn() {
printf "${ORANGE}$1${NOCOLOR}\n"
}
if [[ $EUID -ne 0 ]];
then
d=`command -v dialog`
if [ -z "$d" ]
then
error "Please install 'dialog' first -> sudo apt install dialog"
exit 1
fi
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
$d \
--backtitle "Linux Post Intall Script" \
--title "DISTRO SELECT" --clear \
--radiolist "This script should install all software selected by you.\n\
It may ocasionally require input from you too.\n\n\
Please select your distro from the list bellow using the space bar key.\n\n\
Press ENTER when you're done." 20 61 5 \
"linuxmint20.1" "Linux Mint 20.1 'Ulyssa'" ON \
"linuxmint20" "Linux Mint 20 'Ulyana'" off 2> $tempfile
retval=$?
choice=`cat $tempfile`
case $retval in
0)
warn "Executing $choice script..."]
sleep 1.5
wget "https://raw.githubusercontent.com/Lennoard/LinuxPostInstalls/master/$choice.sh"
sudo bash "$choice.sh" $USER $HOME
;;
1)
warn "Canceled"
exit 1
;;
255)
error "Canceled"
exit 1
;;
esac
else
error "You should NOT run me directly as root. Close the terminal window and try again."
exit 1
fi