codesnap.nvim/scripts/build_generator.sh

17 lines
279 B
Bash
Executable File

source ./scripts/check_os.sh
(cd ./generator; cargo build $1)
lib_suffix="so"
target="debug"
if [[ $os =~ "mac" ]]; then
lib_suffix="dylib"
fi
if [[ $1 =~ "release" ]]; then
target="release"
fi
cp -rf ./generator/target/$target/libgenerator.$lib_suffix lua/generator.so