minecraft-pi-reborn/scripts/build-example-mods.sh
2024-02-04 00:36:58 -05:00

23 lines
334 B
Bash
Executable File

#!/bin/sh
set -e
# Create Output Directory
ROOT="$(pwd)"
OUT="${ROOT}/out/example-mods"
rm -rf "${OUT}"
mkdir -p "${OUT}"
# Build
for MOD in example-mods/*/; do
cd "${ROOT}/${MOD}"
# Build
rm -rf build
mkdir build
cd build
cmake -GNinja ..
cmake --build .
# Copy Result
cp lib*.so "${OUT}"
done