-
Notifications
You must be signed in to change notification settings - Fork 469
/
install.sh
executable file
·48 lines (40 loc) · 1.34 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
#!/bin/bash -e
# install system deps
if [ $(which apt-get) ]; then
echo "installing deps for ubuntu"
sudo apt-get -y install git curl python python-dev python3-pip build-essential pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev
sudo pip3 install virtualenv
else
echo "*** You'll need to install Ubuntu or get a working build env for qemu and python yourself ***"
fi
# build qemu
if [[ "$(uname)" == 'Linux' ]]; then
if [ $(tracers/qemu/qira-i386 > /dev/null; echo $?) == 1 ]; then
echo "QIRA QEMU appears to run okay"
else
echo "building QEMU"
cd tracers
./qemu_build.sh
cd ../
fi
else
echo "QEMU user only works on Linux."
echo "While the rest of QIRA will run, you cannot run binaries."
echo "This is due to QEMU user forwarding the syscalls to the kernel."
echo "See other backends in qira/tracers, PIN may work on Windows and OS X"
fi
echo "building python venv"
virtualenv venv
source venv/bin/activate
pip install --upgrade pip
pip install --upgrade -r requirements.txt
echo "running tests"
./run_tests.sh
echo "making systemwide symlink"
sudo ln -sf $(pwd)/qira /usr/local/bin/qira
echo "***************************************"
echo " Thanks for installing QIRA"
echo " Check out README for more info"
echo " Or just dive in with 'qira /bin/ls'"
echo " And point Chrome to localhost:3002"
echo " ~geohot"