-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_env.sh
executable file
·38 lines (30 loc) · 1.39 KB
/
init_env.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
#!/bin/bash
# ==============================================================================
# build env for V8
# ==============================================================================
HOME="/home/john"
PACKAGE="bison cdbs curl wget flex g++ gdb git python python2 vim pkg-config nodejs npm iproute2 iputils-ping file less ps-watcher binutils sudo locales bash-completion"
sed -i 's/deb.debian.org/mirrors.nju.edu.cn/g' /etc/apt/sources.list
apt-get update
apt-get upgrade -yqq
DEBIAN_FRONTEND=noninteractive apt-get install ${PACKAGE} -yqq
apt-get clean
sed -i 's/# en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen
locale-gen
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ${HOME}/.depot_tools
echo "export PATH=${HOME}/.depot_tools:${PATH}" >> ${HOME}/.bashrc
echo "cd ${HOME}" >> ${HOME}/.bashrc
mkdir ${HOME}/share/v8_project
ln -s ${HOME}/share/v8_project ${HOME}/v8_project
mv ${HOME}/build.sh ${HOME}/v8_project/
cd ${HOME}/v8_project
fetch v8
echo "source ${HOME}/v8_project/v8/tools/gdbinit" >> ${HOME}/.gdbinit
echo "source ${HOME}/v8_project/v8/tools/gdb-v8-support.py" >> ${HOME}/.gdbinit
# setting gdb for v8 debug
# =============================================================================
git clone https://github.com/pwndbg/pwndbg ${HOME}/.pwndbg
cd ${HOME}/.pwndbg && ./setup.sh && cd -
chown -R john:john ${HOME}
echo "setting password for john"
passwd john