File size: 573 Bytes
375bdc3
b200c87
 
375bdc3
 
 
b200c87
 
 
 
 
 
375bdc3
 
 
b200c87
 
 
 
 
375bdc3
b200c87
 
375bdc3
b200c87
 
375bdc3
b200c87
375bdc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
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!"