forked from plasma-disassembler/plasma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·56 lines (48 loc) · 1.4 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
#!/bin/bash
umask 002
if [ "$1" != "--update" ]; then
if [ $(tput colors) -ne 256 ]; then
echo -n "warning: your terminal doesn't support 256 colors, continue ? [Y/n] "
read line
if [ "$line" == "n" ]; then
exit
fi
fi
REQ_EXEC="python3 pip3 c++filt"
for EXEC in ${REQ_EXEC}
do
if [ ! -x "$(command -v $EXEC)" ]
then
echo "error: unable to find $EXEC, this is required to setup this project"
exit
fi
done
PYTHON_VERSION=`python3 -c 'import sys; print("%i" % (sys.hexversion<0x03040000))'`
if [ $PYTHON_VERSION -ne 0 ]; then
echo "error: you need at least python 3.4 to run this project"
exit
fi
# Capstone
pushd . > /dev/null
mkdir -p build
cd build
CAPSTONE_VERSION="3.0.5-rc3"
if [ -d capstone_$CAPSTONE_VERSION ]; then
cd capstone_$CAPSTONE_VERSION
make clean
else
git clone -b $CAPSTONE_VERSION --depth 1 https://github.com/aquynh/capstone
mv capstone capstone_$CAPSTONE_VERSION
cd capstone_$CAPSTONE_VERSION
fi
./make.sh
sudo -H ./make.sh install
cd bindings/python/
make install3
popd > /dev/null
sudo -H pip3 install -r requirements.txt
sudo -H pip3 install future
fi
python3 setup.py build_ext --inplace
# Or create an alias to run_plasma.py
sudo -H python3 setup.py install