-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathbootstrap
executable file
·61 lines (54 loc) · 1.33 KB
/
bootstrap
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
61
#!/bin/bash
frida_version=15.0.8
cd "$(dirname $0)"
platform=$(tools/unix/detect-platform)
arch=$1
if [ -z "$arch" ]; then
if [ -n "$CRYPTOSHARK_ARCH" ]; then
arch=$CRYPTOSHARK_ARCH
else
arch=$(tools/unix/detect-arch)
fi
fi
if [ -z "$CRYPTOSHARK_ARCH" ]; then
. tools/$platform/activate-env || exit $?
fi
if [ ! -f ext/frida-qml/frida-qml.pri ]; then
echo ""
echo "***"
echo "*** Fetching submodules"
echo "***"
git submodule init
git submodule update || exit $?
fi
devkit_url="https://github.com/frida/frida/releases/download/$frida_version/frida-core-devkit-$frida_version-$platform-$arch.tar.xz"
devkit_dir="ext/frida-core/$arch"
if [ ! -f "$devkit_dir/libfrida-core.a" ]; then
echo ""
echo "***"
echo "*** Fetching frida-core devkit for $platform-$arch"
echo "***"
rm -rf "$devkit_dir"
mkdir -p "$devkit_dir"
pushd "$devkit_dir" > /dev/null
curl "$devkit_url" -fLo devkit.tar.xz || exit $?
tar Jxf devkit.tar.xz || exit $?
rm devkit.tar.xz
popd > /dev/null
fi
if [ ! -f ext/radare2/build/priv_install_dir/lib/libr_core.a ]; then
echo ""
echo "***"
echo "*** Building Radare"
echo "***"
tools/unix/build-radare || exit $?
fi
if [ ! -f app/agent.js ]; then
echo ""
echo "***"
echo "*** Building Agent"
echo "***"
pushd app/agent > /dev/null
npm install || exit $?
popd > /dev/null
fi