sudo-soldier commited on
Commit
b200c87
·
verified ·
1 Parent(s): 6099260

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +18 -9
entrypoint.sh CHANGED
@@ -1,20 +1,29 @@
1
  #!/usr/bin/env bash
 
 
2
  MANIFEST_URL=$1
3
  APP_ID=$2
4
 
 
 
 
 
 
 
5
  mkdir -p "$APP_ID"
6
  cd "$APP_ID"
7
 
8
- echo "Downloading manifest..."
9
- wget -O manifest.json "$MANIFEST_URL" || exit 1
 
 
 
10
 
11
- echo "Initializing Bubblewrap..."
12
- twa init --manifest manifest.json --directory . --force || exit 2
13
 
14
- echo "Building APK..."
15
- twa build || exit 3
16
 
17
- echo "Signing APK..."
18
- twa deploy --type "apk" || exit 4
19
 
20
- echo "APK ready."
 
1
  #!/usr/bin/env bash
2
+ set -e
3
+
4
  MANIFEST_URL=$1
5
  APP_ID=$2
6
 
7
+ echo "[*] Checking for Bubblewrap CLI..."
8
+ if ! command -v twa &> /dev/null; then
9
+ echo "[!] Bubblewrap (twa) is not installed or not in PATH."
10
+ exit 127
11
+ fi
12
+
13
  mkdir -p "$APP_ID"
14
  cd "$APP_ID"
15
 
16
+ echo "[*] Downloading manifest from $MANIFEST_URL..."
17
+ wget -O manifest.json "$MANIFEST_URL"
18
+
19
+ echo "[*] Initializing project with Bubblewrap..."
20
+ twa init --manifest manifest.json --directory . --force
21
 
22
+ echo "[*] Building APK..."
23
+ twa build
24
 
25
+ echo "[*] Signing APK..."
26
+ twa deploy --type "apk"
27
 
28
+ echo "[+] APK build complete!"
 
29