cutter/scripts/rz-ghidra.sh

26 lines
682 B
Bash
Raw Normal View History

2019-08-30 11:41:14 +00:00
#!/bin/bash
set -e
2019-08-30 11:41:14 +00:00
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
cd "$SCRIPTPATH/.."
if [[ ! -d rz-ghidra ]]; then
# remove depth, branch and uncomment lines bellow to use specifc commit
git clone --recurse-submodules git@github.com:rizinorg/rz-ghidra.git --depth 1 --branch master || exit 1
# git clone --recurse-submodules https://github.com/rizinorg/rz-ghidra.git --depth 1 --branch master || exit 1
#pushd rz-ghidra
#git checkout --recurse-submodules 5e845f4b50e8559bd51af03b22b6586e8cc5c35c
#popd
2019-08-30 11:41:14 +00:00
fi
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