Spaces:
Sleeping
Sleeping
Update entrypoint.sh
Browse files- 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"
|
|
|
|
|
|
|
10 |
|
11 |
-
echo "
|
12 |
-
twa
|
13 |
|
14 |
-
echo "
|
15 |
-
twa
|
16 |
|
17 |
-
echo "
|
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 |
|
|