-
Notifications
You must be signed in to change notification settings - Fork 2
/
easy_install.sh
57 lines (52 loc) · 1.65 KB
/
easy_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
#!/bin/bash
# Install git
if [ -z "`which git`" ]; then
echo "Installing git"
if [ -f /usr/bin/pacman ]; then
pacman -Syy &> /dev/null
pacman -S --noconfirm git &> /dev/null
elif [ -f /usr/bin/apt-get ]; then
yes | apt-get update &> /dev/null
apt-get --yes --force-yes install git &> /dev/null
elif [ -f /usr/bin/yum ]; then
yum install -y -q -e 0 git &> /dev/null
fi
fi
git clone --recurse-submodules https://github.com/mad-cat-lon/nopfrog
# Install git
if [ -z "`which gcc`" ]; then
echo "Installing gcc"
if [ -f /usr/bin/pacman ]; then
pacman -S --noconfirm base-devel &> /dev/null
elif [ -f /usr/bin/apt-get ]; then
apt-get --yes --force-yes install gcc &> /dev/null
elif [ -f /usr/bin/yum ]; then
yum install -y -q -e 0 gcc &> /dev/null
fi
fi
# Install make
if [ -z "`which make`" ]; then
echo "Installing make"
if [ -f /usr/bin/pacman ]; then
pacman -S --noconfirm make &> /dev/null
elif [ -f /usr/bin/apt-get ]; then
apt-get --yes --force-yes install make &> /dev/null
elif [ -f /usr/bin/yum ]; then
yum install -y -q -e 0 make &> /dev/null
fi
fi
# install binutils (for libopcodes)
echo "Installing binutils"
if [ -f /usr/bin/pacman ]; then
pacman -Syy &> /dev/null
pacman -S --noconfirm binutils &> /dev/null
elif [ -f /usr/bin/apt-get ]; then
yes | apt-get update &> /dev/null
apt-get --yes --force-yes install binutils &> /dev/null
elif [ -f /usr/bin/yum ]; then
yum install -y -q -e 0 binutils.x86_64 &> /dev/null
fi
cd nopfrog
chmod +x build.sh
./build.sh
./rkinject.o $PWD/libdl.so $PWD/libc.so