mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
32 lines
583 B
Bash
Executable File
32 lines
583 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
run=false
|
|
|
|
TEMP=$(getopt --long -o "g" "$@")
|
|
eval set -- "$TEMP"
|
|
while true; do
|
|
case "$1" in
|
|
-g)
|
|
run=true
|
|
shift 2
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
echo "ANDROID_HOME: $ANDROID_HOME"
|
|
echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT"
|
|
echo "ANDROID_NDK_ROOT: $ANDROID_NDK_ROOT"
|
|
|
|
cargo install cargo-apk
|
|
|
|
if [ "$run" = true ] ; then
|
|
# -Zbuild-std is required for latest NDK: https://github.com/rust-windowing/android-ndk-rs/pull/189
|
|
cargo +nightly-2022-04-04 apk run --lib -Zbuild-std
|
|
else
|
|
cargo +nightly-2022-04-04 apk build --lib -Zbuild-std
|
|
fi
|