mirror of
https://github.com/zardus/ctf-tools
synced 2024-12-13 06:22:34 +00:00
7144e756e5
early on any error + anticipate that some tools can't be installed by now, but we still want the test to return success to satisfy travis-ci
27 lines
701 B
Bash
Executable file
27 lines
701 B
Bash
Executable file
#!/bin/bash -ex
|
|
set -e -o pipefail
|
|
|
|
git clone --depth 1 https://github.com/keystone-engine/keystone.git
|
|
|
|
source ctf-tools-venv-activate
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
mkdir -p keystone/build/
|
|
pushd keystone/build/
|
|
cmake -DCMAKE_INSTALL_PREFIX="$DIR" \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DLLVM_TARGETS_TO_BUILD="all" \
|
|
-G "Unix Makefiles" ..
|
|
make -j$(getconf _NPROCESSORS_ONLN) install
|
|
popd
|
|
|
|
pushd keystone/bindings/python
|
|
pip install -U -e .
|
|
# create a symlink that the python bindings can find the keystone lib
|
|
ln -s $(readlink -f ../../../lib/libkeystone.so.0) keystone/libkeystone.so
|
|
popd
|
|
|
|
# kstool doesn't find the lib. so let's rm it
|
|
rm -r bin/
|