#!/usr/bin/env bash # Put here all apk update scripts UPDATE_SCRIPTS=( "./scripts/apk-update-scripts/sheetless.sh" ) for script in "${UPDATE_SCRIPTS[@]}"; do echo "--------------------------------" echo "Executing: $script" # Run the script $script done # Sync all apks from the mounted dir to dest SOURCE="/apks/" DEST="/src/code/fdroid/repo/" OUTPUT=$(rsync -avi --include="*.apk" --exclude="*" --delete "$SOURCE" "$DEST") # Check if the output contains the specific tags for new files (>f) or deleted files (*deleting) if echo "$OUTPUT" | grep -q -E '^>f|^\*deleting'; then echo "Changes detected! Files were copied or deleted." exit 10 else echo "No APKs were added or removed. Skipping F-Droid update." exit 0 fi