#!/usr/bin/env bash set -e set -x # Copy all the required files from volume QJS_PATH=/opt/quickjs-tart cp $QJS_PATH/docker-android/build.sh ./ cp -r $QJS_PATH/quickjs ./ cp -r $QJS_PATH/sqlite3 ./ cp -r $QJS_PATH/subprojects ./ cp -r $QJS_PATH/QuickJS-android ./ cp $QJS_PATH/meson.build ./ mkdir ./cross && cp $QJS_PATH/cross/build-android.sh ./cross/ cp $QJS_PATH/*.c ./ cp $QJS_PATH/*.h ./ cp $QJS_PATH/*.js ./ # Get wallet-core version from gradle.properties GRADLE_PROPERTIES_FILE=./QuickJS-android/gradle.properties WALLET_CORE_VERSION=$(grep -hoP '^WALLET_CORE_VERSION=\K.*' $GRADLE_PROPERTIES_FILE) # Download and build wallet-core (as non-root) git clone https://git.taler.net/wallet-core.git cd wallet-core/ git checkout "tags/${WALLET_CORE_VERSION}" useradd walletcore chown -R walletcore:walletcore . su walletcore <