Spaces:
Running
Running
set -e | |
MANIFEST_URL=$1 | |
APP_ID=$2 | |
echo "[*] Checking for Bubblewrap CLI..." | |
if ! command -v twa &> /dev/null; then | |
echo "[!] Bubblewrap (twa) is not installed or not in PATH." | |
exit 127 | |
fi | |
mkdir -p "$APP_ID" | |
cd "$APP_ID" | |
echo "[*] Downloading manifest from $MANIFEST_URL..." | |
wget -O manifest.json "$MANIFEST_URL" | |
echo "[*] Initializing project with Bubblewrap..." | |
twa init --manifest manifest.json --directory . --force | |
echo "[*] Building APK..." | |
twa build | |
echo "[*] Signing APK..." | |
twa deploy --type "apk" | |
echo "[+] APK build complete!" | |