2019-08-30 11:41:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-09-02 16:49:01 +00:00
|
|
|
set -e
|
|
|
|
|
2019-08-30 11:41:14 +00:00
|
|
|
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
|
|
|
|
|
|
|
|
cd "$SCRIPTPATH/.."
|
|
|
|
|
|
|
|
if [[ ! -d r2ghidra-dec ]]; then
|
2020-09-02 16:49:01 +00:00
|
|
|
git clone --recurse-submodules https://github.com/radareorg/r2ghidra-dec.git || exit 1
|
|
|
|
pushd r2ghidra-dec
|
|
|
|
git checkout --recurse-submodules 8e576eeadc211de4ac8d8c759cc368fa48cdfa99
|
|
|
|
popd
|
2019-08-30 11:41:14 +00:00
|
|
|
fi
|
|
|
|
cd r2ghidra-dec || exit 1
|
|
|
|
|
|
|
|
mkdir build && cd build || exit 1
|
|
|
|
cmake -G Ninja "$@" .. || exit 1
|
|
|
|
ninja || exit 1
|
|
|
|
ninja install || exit 1
|
|
|
|
|