-
Notifications
You must be signed in to change notification settings - Fork 89
/
install
executable file
·156 lines (138 loc) · 4.45 KB
/
install
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/bin/bash
########################################
# Check Operating System #
########################################
arch_linux=$(cat /etc/os-release 2>&1 | grep "arch") # Arch Linux does not come with lsb_release command
if [[ -n "$arch_linux" ]]
then
echo "Arch Linux detected"
sudo pacman -S lsb-release
else
ubuntu20_04=$(lsb_release -d 2>&1 | grep "Ubuntu 20.04")
parrot_os=$(lsb_release -d 2>&1 | grep "Parrot")
dragonOS_focal=$(lsb_release -d 2>&1 | grep "DragonOS Focal$")
#dragonOS_focalx=$(lsb_release -d 2>&1 | grep "DragonOS FocalX") # May print old version after upgrade to FocalX
dragonOS_focalx=$(cat /etc/os-dragonos 2>&1 | grep "DragonOS FocalX")
kde_neon=$(lsb_release -d 2>&1 | grep "KDE neon")
ubuntu18_04=$(lsb_release -d 2>&1 | grep "Ubuntu 18.04")
ubuntu22_04=$(lsb_release -d 2>&1 | grep "Ubuntu 22.04")
kali23_1=$(lsb_release -d 2>&1 | grep "Kali")
backbox=$(cat /etc/issue -d 2>&1 | grep "BackBox")
raspberry_pi_os=$(lsb_release -d 2>&1 | grep "bookworm")
ubuntu24_04=$(lsb_release -d 2>&1 | grep "Ubuntu 24.04")
fi
########################################
# Print Detected #
########################################
# Ubuntu 20.04
if [[ -n "$ubuntu20_04" ]]
then
echo "Ubuntu 20.04 detected"
fi
# DragonOS Focal
if [[ -n "$dragonOS_focal" ]]
then
echo "DragonOS Focal detected. Focal is no longer supported. Update to FocalX."
exit
fi
# KDE neon 5.25
if [[ -n "$kde_neon" ]]
then
kde_version=$(lsb_release -d 2>&1 | grep "5.25")
if [[ -n "$kde_version" ]]
then
echo "KDE neon 5.25 detected"
fi
fi
# Ubuntu 22.04
if [[ -n "$ubuntu22_04" ]]
then
echo "Ubuntu 22.04 detected"
ubuntu_arm=$(lscpu 2>&1 | grep "ARM")
if [[ -n "$ubuntu_arm" ]]
then
echo "ARM detected"
fi
fi
# Kali 23.1
if [[ -n "$kali23_1" ]]
then
echo "Kali detected"
fi
# DragonOS FocalX
if [[ -n "$dragonOS_focalx" ]]
then
echo "DragonOS FocalX detected"
fi
# BackBox
if [[ -n "$backbox" ]]
then
echo "BackBox detected"
fi
# Raspberry Pi OS
if [[ -n "$raspberry_pi_os" ]]
then
echo "Raspberry Pi OS (bookworm) detected"
fi
# Parrot OS
if [[ -n "$parrot_os" ]]
then
echo "Parrot OS detected"
fi
# Ubuntu 24.04
if [[ -n "$ubuntu24_04" ]]
then
echo "Ubuntu 24.04 detected"
fi
# Python2-maint_3.7, Ubuntu 18.04
if [[ -n "$ubuntu18_04" ]]
then
echo "This branch is not for Ubuntu 18.04 variants. Switch to the Python2_maint-3.7 branch and try again!"
exit
fi
########################################
# Check for Qt5 #
########################################
qt5_version=$(qmake --version | grep "version 5")
if [[ -z "$qt5_version" ]]
then
echo "No Qt5 found."
read -p "Qt5 is required to open the installer. Proceeding with this operation will install the missing packages and open the installer. Do you want to proceed? [y]/n: " yn
case $yn in
# No
[Nn]* ) exit;;
# Yes/Everything Else
* )
# Ubuntu 20.04
if [[ -n "$ubuntu20_04" ]]
then
sudo apt-get install -y build-essential qtcreator qt5-default python3-pyqt5
fi
# KDE Neon
if [[ -n "$kde_neon" ]]
then
kde_version=$(lsb_release -d 2>&1 | grep "5.25")
if [[ -n "$kde_version" ]]
then
# KDE neon 5.25
sudo apt-get install -y build-essential qtcreator qt5-default python3-pyqt5
sudo apt-get install -y fonts-ubuntu
fi
fi
# Ubuntu 22.04, Kali 23.1, BackBox, Ubuntu 24.04
if [[ -n "$ubuntu22_04" ]] || [[ -n "$kali23_1" ]] || [[ -n "$backbox" ]] || [[ -n "$raspberry_pi_os" ]] || [[ -n "$parrot_os" ]] || [[ -n "$ubuntu24_04" ]]
then
sudo apt-get install -y build-essential qtcreator qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools python3-pyqt5
if [[ -n "$kali23_1" ]] || [[ -n "$raspberry_pi_os" ]] || [[ -n "$parrot_os" ]]
then
sudo apt-get install -y fonts-ubuntu
fi
fi
;;
esac
fi
########################################
# Run the Full Installer #
########################################
DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
$DIR/Installer/installer