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/.."
|
|
|
|
|
2020-11-26 16:51:20 +00:00
|
|
|
if [[ ! -d rz-ghidra ]]; then
|
2020-12-08 16:27:54 +00:00
|
|
|
# remove depth, branch and uncomment lines below to use specifc commit
|
2020-11-26 16:51:20 +00:00
|
|
|
|
2020-12-08 16:27:54 +00:00
|
|
|
git clone --recurse-submodules https://github.com/rizinorg/rz-ghidra.git --depth 1 --branch master || exit 1
|
2020-11-26 16:51:20 +00:00
|
|
|
|
|
|
|
#pushd rz-ghidra
|
2020-09-06 08:52:13 +00:00
|
|
|
#git checkout --recurse-submodules 5e845f4b50e8559bd51af03b22b6586e8cc5c35c
|
|
|
|
#popd
|
2019-08-30 11:41:14 +00:00
|
|
|
fi
|
2020-11-26 16:51:20 +00:00
|
|
|
cd rz-ghidra || exit 1
|
2019-08-30 11:41:14 +00:00
|
|
|
|
|
|
|
mkdir build && cd build || exit 1
|
|
|
|
cmake -G Ninja "$@" .. || exit 1
|
|
|
|
ninja || exit 1
|
|
|
|
ninja install || exit 1
|
|
|
|
|