Compare commits

..
5 Commits
Author SHA1 Message Date
julian 0684aaa1c6 update: again fix stat command 2026-06-30 10:01:34 +02:00
julian 1fb8acf316 update: fix new stat command 2026-06-30 09:58:26 +02:00
julian 97a8597c00 update: do not hash modification date as this leads to rebuilding every time 2026-06-30 09:54:14 +02:00
julian 8cf3945f1c Update Readme.md 2026-06-22 06:41:10 +00:00
julian e7f70de19a Update Readme.md 2026-06-22 06:40:38 +00:00
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -40,6 +40,7 @@ This key can be generated by running `age-keygen -o key.txt`.
The update script downloads new apk versions into the `/apks` directory. The update script downloads new apk versions into the `/apks` directory.
The apks in there are synced on each update run to the `/src/code/fdroid/repo` directory, where they are served from. The apks in there are synced on each update run to the `/src/code/fdroid/repo` directory, where they are served from.
Therefore, the `/apks` directory is the perfect place to mount an external volume to persist all apks and avoid re-downloading on container restart. Therefore, the `/apks` directory is the perfect place to mount an external volume to persist all apks and avoid re-downloading on container restart.
This also allows manually placing apks to be served into this directory.
## Apk update scripts ## Apk update scripts
To automatically pull new versions of an apk, create a bash script in the `scripts/apk-update-scripts` directory. To automatically pull new versions of an apk, create a bash script in the `scripts/apk-update-scripts` directory.
+2 -2
View File
@@ -17,12 +17,12 @@ done
SOURCE="/apks/" SOURCE="/apks/"
DEST="/src/code/fdroid/repo/" 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..." echo "Syncing apks in directory $DEST with $SOURCE..."
rsync -rv --include="*.apk" --exclude="*" --delete "$SOURCE" "$DEST" 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 if [ "$HASH_BEFORE" == "$HASH_AFTER" ]; then
echo "No APKs were added or removed. Skipping F-Droid update." echo "No APKs were added or removed. Skipping F-Droid update."