···11#!/bin/bash
2233+# Check if a file path argument is provided
44+if [ $# -eq 0 ]; then
55+ echo "Usage: $0 <path-to-apk-file>"
66+ exit 1
77+fi
88+99+# Get the input file path
1010+INPUT_APK="$1"
1111+1212+# Check if the file exists
1313+if [ ! -f "$INPUT_APK" ]; then
1414+ echo "Error: File '$INPUT_APK' not found"
1515+ exit 1
1616+fi
1717+318# Get the current UNIX timestamp
419TIMESTAMP=$(date +%s)
520621# Move APK file to its new home
77-mv monarch-release.apk monarch-release-$TIMESTAMP.apk
2222+mv "$INPUT_APK" monarch-release-$TIMESTAMP.apk
2323+2424+# Export the final APK path as an environment variable
2525+export MONARCH_APK_PATH="$(pwd)/monarch-release-$TIMESTAMP.apk"
2626+export MONARCH_APK_FILENAME="monarch-release-$TIMESTAMP.apk"
827928# Define the output filename
1029OUTPUT_FILE="index.html"