cutter/scripts/jsdec.sh
Khairul Azhar Kasmiran 3ddb1b9a58
ci: Remove rimraf before make package (#3393)
* ci: Remove rimraf before `make package`
* Use `|| brew link --overwrite pkgconf`
* jsdec.sh: Use `mkdir -p`
* rz-libyara.sh: Use `mkdir -p`
2024-11-24 13:00:28 +08:00

25 lines
637 B
Bash
Executable File

#!/bin/bash
set -e
INSTALL_PREFIX="$1"
EXTRA_CMAKE_OPTS="$2"
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
cd "$SCRIPTPATH/.."
if [ ! -d jsdec ]; then
git clone https://github.com/rizinorg/jsdec.git --depth 1 --branch "dev"
fi
cd jsdec
if [ -d build_lib ]; then
rm -rf build_lib
fi
meson setup --buildtype=release --pkg-config-path="$INSTALL_PREFIX/lib/pkgconfig" -Dbuild_type=cutter build_lib
ninja -C build_lib
mkdir -p build_plugin && cd build_plugin
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DJSDEC_BUILD_DIR="../build_lib" -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $EXTRA_CMAKE_OPTS ../cutter-plugin
ninja install