From 3564512a6386a84dc0ab816f7cd6d5828336ffce Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Wed, 28 Aug 2024 19:20:51 +0200 Subject: [PATCH] android/setup-libs.sh: move to posix shell Convert various non posix consturcts and change shebang to /bin/sh Signed-off-by: Ralph Sennhauser --- build/android/setup-libs.sh | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/build/android/setup-libs.sh b/build/android/setup-libs.sh index 08eb7870da..f6b85c2a0f 100755 --- a/build/android/setup-libs.sh +++ b/build/android/setup-libs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e set -o nounset @@ -21,11 +21,11 @@ build_js185=true JOBS=${JOBS:="-j4"} SYSROOT=$TOOLCHAIN/sysroot -export PATH=$TOOLCHAIN/bin:$PATH +export PATH="$TOOLCHAIN/bin:$PATH" CFLAGS="-mandroid -mthumb -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp" mkdir -p files -pushd files +cd files if [ ! -e boost_1_45_0.tar.bz2 ]; then wget http://downloads.sourceforge.net/project/boost/boost/1.45.0/boost_1_45_0.tar.bz2 @@ -59,7 +59,7 @@ if [ ! -e libxml2-2.7.8.tar.gz ]; then wget ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz fi -popd +cd - if [ "$build_toolchain" = "true" ]; then @@ -71,12 +71,12 @@ if [ "$build_toolchain" = "true" ]; then # Set up some symlinks to make the SpiderMonkey build system happy ln -sfT ../platforms "$NDK"/build/platforms for f in "$TOOLCHAIN"/bin/arm-linux-androideabi-*; do - ln -sf "$f" "${f/arm-linux-androideabi-/arm-eabi-}" + ln -sf "$f" "$(printf '%s' "$f" | sed "s/arm-linux-androideabi-/arm-eabi-/")" done # Set up some symlinks for the typical autoconf-based build systems for f in "$TOOLCHAIN"/bin/arm-linux-androideabi-*; do - ln -sf "$f" "${f/arm-linux-androideabi-/arm-linux-eabi-}" + ln -sf "$f" "$(printf '%s' "$f" | sed "s/arm-linux-androideabi-/arm-linux-eabi-/")" done fi @@ -88,68 +88,68 @@ if [ "$build_boost" = "true" ]; then tar xvf files/MysticTreeGames-Boost-for-Android-70838fc.tar.gz -C temp/ cp files/boost_1_45_0.tar.bz2 temp/MysticTreeGames-Boost-for-Android-70838fc/ patch temp/MysticTreeGames-Boost-for-Android-70838fc/build-android.sh