fix(fdroid): missing jq, cron errors
This commit is contained in:
parent
b4c9f173bd
commit
37c7a4dfcc
@ -1,8 +1,8 @@
|
||||
BASE_URL=fdroid.
|
||||
EMAIL=
|
||||
|
||||
REPO_NAME=fdroid
|
||||
CRON_APP_UPDATE='0 0 * * 1'
|
||||
REPO_NAME=
|
||||
CRON_APP_UPDATE='0 0 * * *'
|
||||
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
|
@ -3,6 +3,7 @@ RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
cron \
|
||||
fdroidserver \
|
||||
jq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY entrypoint.sh /docker-entrypoint.d/99-entrypoint.sh
|
||||
COPY scripts/ /usr/local/bin/
|
||||
|
@ -23,7 +23,7 @@ services:
|
||||
- PGID
|
||||
volumes:
|
||||
- ./repo/:/repo/
|
||||
- ./apks.txt:/:ro
|
||||
- ./apks.txt:/apks.txt:ro
|
||||
networks:
|
||||
- nginx
|
||||
|
||||
|
@ -11,6 +11,6 @@
|
||||
|
||||
get_apks.sh
|
||||
|
||||
echo "$CRON_APP_UPDATE root get_apks.sh" > /etc/cron.d/get_new_apks
|
||||
echo "$CRON_APP_UPDATE /usr/local/bin/get_apks.sh >> /var/log/cron.log 2>&1" | crontab -
|
||||
|
||||
/etc/init.d/cron start
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
docker run --rm -v "$PWD/repo/:/repo/" \
|
||||
'registry.gitlab.com/fdroid/docker-executable-fdroidserver:master' \
|
||||
init -v
|
@ -19,12 +19,10 @@ function get_links() {
|
||||
done
|
||||
}
|
||||
|
||||
LINKS="$(get_links apks.txt)"
|
||||
LINKS="$(get_links /apks.txt)"
|
||||
|
||||
(cd /repo/
|
||||
xargs -n1 -P8 curl -LO <<< "$LINKS"
|
||||
fdroid update -c
|
||||
)
|
||||
(cd /repo/repo/ && xargs -n1 -P8 curl -LOC- <<< "$LINKS")
|
||||
(cd /repo/ && fdroid update -c)
|
||||
|
||||
if [ -n "$PUID" ]; then
|
||||
chown -R "$PUID:$PGID" /repo/
|
||||
|
@ -7,7 +7,7 @@ function get_urls() {
|
||||
local repo="$1"
|
||||
|
||||
curl -sSL "$API/repos/$repo/releases/latest" | \
|
||||
jq -r ".assets.[] | select(.content_type == $CONTENT_TYPE) | .browser_download_url"
|
||||
jq -r ".assets | select(.[].content_type == $CONTENT_TYPE) | .[].browser_download_url"
|
||||
}
|
||||
|
||||
function get_repo_name_from_url() {
|
||||
|
@ -6,7 +6,7 @@ function get_urls() {
|
||||
local repo="$1"
|
||||
|
||||
curl -L "$API/projects/$repo/releases" | \
|
||||
jq -r '.[0].assets.links.[] | select(.name | test(".apk$")) | .url'
|
||||
jq -r '.[0].assets.links | select(.[].name | test(".apk$")) | .[].url'
|
||||
}
|
||||
|
||||
function get_repo_name_from_url() {
|
||||
|
Loading…
Reference in New Issue
Block a user