-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·69 lines (58 loc) · 1.56 KB
/
install.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
#!/bin/bash
set -e
do_install() {
# install pip3 if missing
if [ ! $(which pip3) ]
then
wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && sudo python3 /tmp/get-pip.py
fi
# install the webclient pack
sudo python3 -m pip install gns3-webclient-pack
# build cache database of MIME types handled by desktop files
sudo update-desktop-database -q || true
sudo update-mime-database -n /usr/share/mime || true
echo "Installation successfully completed!"
exit 0
}
# Detect the Linux distribution
if [ -r /etc/os-release ]
then
. /etc/os-release
elif [ $(which lsb_release) ]
then
ID=$(lsb_release -si)
VERSION_ID=$(lsb_release -sr)
else]]
echo "Sorry, your Linux distribution is not supported"
exit 1
fi
echo "Detected Linux distribution: $ID $VERSION_ID (${ID_LIKE:-"none"})"
for distro_id in $ID $ID_LIKE; do
case "$distro_id" in
debian|ubuntu)
sudo apt-get install -y python3 python3-pyqt5 telnet vinagre virt-viewer wireshark
do_install
;;
arch|archlinux|manjaro)
sudo pacman -S python python-pyqt5 qt5-websockets vinagre virt-viewer wireshark-qt
do_install
;;
fedora)
sudo dnf install -y python3 python3-pyqt5-sip telnet vinagre virt-viewer wireshark
do_install
;;
opensuse|suse)
sudo zypper install -y python3 python3-pyqt5 telnet vinagre virt-viewer wireshark-ui-qt
do_install
;;
#centos|CentOS|rhel)
# sudo yum install -y python3 PyQt5 telnet vinagre virt-viewer wireshark-gnome
# do_install
# ;;
*)
continue
;;
esac
done
echo "Sorry, your Linux distribution is not supported"
exit 1