update: do not hash modification date as this leads to rebuilding every time
This commit is contained in:
@@ -17,12 +17,12 @@ done
|
||||
SOURCE="/apks/"
|
||||
DEST="/src/code/fdroid/repo/"
|
||||
|
||||
HASH_BEFORE=$(ls -l "$DEST" | sha256sum)
|
||||
HASH_BEFORE=$(stat -c "%A %h %U %G %s %n" "$DEST/*" | sha256sum)
|
||||
|
||||
echo "Syncing apks in directory $DEST with $SOURCE..."
|
||||
rsync -rv --include="*.apk" --exclude="*" --delete "$SOURCE" "$DEST"
|
||||
|
||||
HASH_AFTER=$(ls -l "$DEST" | sha256sum)
|
||||
HASH_AFTER=$(stat -c "%A %h %U %G %s %n" "$DEST/*" | sha256sum)
|
||||
|
||||
if [ "$HASH_BEFORE" == "$HASH_AFTER" ]; then
|
||||
echo "No APKs were added or removed. Skipping F-Droid update."
|
||||
|
||||
Reference in New Issue
Block a user