Compare commits
5
Commits
6cab77cf22
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0684aaa1c6 | ||
|
|
1fb8acf316 | ||
|
|
97a8597c00 | ||
|
|
8cf3945f1c | ||
|
|
e7f70de19a |
@@ -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 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.
|
||||
This also allows manually placing apks to be served into this directory.
|
||||
|
||||
## Apk update scripts
|
||||
To automatically pull new versions of an apk, create a bash script in the `scripts/apk-update-scripts` directory.
|
||||
|
||||
@@ -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