forked from korcankaraokcu/PINCE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
60 lines (50 loc) · 1.62 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
#!/bin/bash
: '
Copyright (C) 2016-2017 Korcan Karaokçu <korcankaraokcu@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
'
install_gdb () {
if ! sudo sh install_gdb.sh ; then
echo "Failed to install PINCE"
exit 1
fi
}
OS_NAME="Debian"
PKG_MGR="apt-get"
PKG_NAMES_ALL="python3-setuptools python3-pip"
PKG_NAMES_DEBIAN="$PKG_NAMES_ALL python3-pyqt5"
PKG_NAMES_SUSE="$PKG_NAMES_ALL python3-qt5"
PKG_NAMES="$PKG_NAMES_DEBIAN"
PKG_NAMES_PIP="psutil pexpect distorm3 pygdbmi"
LSB_RELEASE="`which lsb_release`"
if [ -n "$LSB_RELEASE" ] ; then
OS_NAME="`$LSB_RELEASE -d -s`"
fi
case "$OS_NAME" in
*SUSE*)
PKG_MGR="zypper"
PKG_NAMES="$PKG_NAMES_SUSE"
;;
esac
sudo $PKG_MGR install $PKG_NAMES
sudo pip3 install $PKG_NAMES_PIP
if [ -e libPINCE/gdb_pince/gdb-8.1.1/bin/gdb ] ; then
echo "GDB has been already compiled&installed, recompile&install? (y/n)"
read answer
if echo "$answer" | grep -iq "^[Yy]" ;then
install_gdb
fi
else
install_gdb
fi
echo "PINCE has been installed successfully!"
echo "Now, just run 'sh PINCE.sh' from terminal"