-
Notifications
You must be signed in to change notification settings - Fork 91
/
Copy pathinstall
executable file
·56 lines (46 loc) · 1.52 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
#!/bin/bash
# Check Operating System
ubuntu22_04=$(lsb_release -d 2>&1 | grep "Ubuntu 22.04")
ubuntu18_04=$(lsb_release -d 2>&1 | grep "Ubuntu 18.04")
ubuntu20_04=$(lsb_release -d 2>&1 | grep "Ubuntu 20.04")
dragonOS_focal=$(lsb_release -d 2>&1 | grep "DragonOS Focal")
kde_neon=$(lsb_release -d 2>&1 | grep "KDE neon")
if [[ -n "$ubuntu22_04" ]]
then
# Ubuntu 22.04
echo "Ubuntu 22.04 detected"
fi
# Python3_maint-3.7, Ubuntu 18.04
if [[ -n "$ubuntu18_04" ]]
then
echo "This branch is for Ubuntu 18.04 only. Switch to the Python2_maint-3.7 branch and try again!"
exit
fi
# Python3_maint-3.8, Ubuntu 20.04, DragonOS Focal, KDE neon
if [[ -n "$ubuntu20_04" ]] || [[ -n "$dragonOS_focal" ]] || [[ -n "$kde_neon" ]]
then
echo "This branch is for Ubuntu 20.04 variants only. Switch to the Python3_maint-3.8 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. Do you want to proceed? [y]/n: " yn
case $yn in
# No
[Nn]* ) exit;;
# Yes/Everything Else
* )
# Ubuntu 22.04
if [[ -n "$ubuntu22_04" ]]
then
sudo apt-get install -y build-essential qtcreator qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools python3-pyqt5
fi
;;
esac
fi
# Run the Full Installer
DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
$DIR/Installer/installer