Files
AXP-Resurection/scripts/build-intellirat-module.sh
T

25 lines
642 B
Bash
Executable File

#!/bin/sh
# Package the systemless IntelliRAT prototype without touching a ROM build.
set -eu
ROOT=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
MODULE="$ROOT/modules/intellirat"
OUTPUT=${1:-"$ROOT/artifacts/IntelliRAT-v0.2.0.zip"}
test -f "$MODULE/module.prop"
test -x "$MODULE/system/bin/intellirat"
test ! -e "$MODULE/action.sh"
if [ ! -f "$MODULE/payload/IntelliRAT.apk" ]; then
echo "WARNING: companion APK is not built; packaging backend-only module" >&2
fi
mkdir -p "$(dirname "$OUTPUT")"
rm -f "$OUTPUT"
(
cd "$MODULE"
zip -qr "$OUTPUT" . -x README.md 'app/*' 'app/**'
)
printf 'OK: %s\n' "$OUTPUT"
sha256sum "$OUTPUT"