summaryrefslogtreecommitdiff
path: root/fdroids.sh
diff options
context:
space:
mode:
authorGordon GECOS <u@adam>2024-07-29 09:12:37 -0400
committerGordon GECOS <u@adam>2024-07-29 09:12:37 -0400
commit2fe569a12bfba865d7e8ef8dbf9bbbb1a6ad10d1 (patch)
treef3fb4ac7a6cb60ec6cc89f01b888912f63437095 /fdroids.sh
parentd8eafffb64c5103117e56cd14e697860804e4b27 (diff)
allow input from stdin
Diffstat (limited to 'fdroids.sh')
-rwxr-xr-xfdroids.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/fdroids.sh b/fdroids.sh
index 4eb1833..369c05e 100755
--- a/fdroids.sh
+++ b/fdroids.sh
@@ -3,6 +3,10 @@ set -ex
3quiet() { "$@" >/dev/null 2>&1; } 3quiet() { "$@" >/dev/null 2>&1; }
4quiet dpkg-query -W html-xml-utils || sudo apt install html-xml-utils 4quiet dpkg-query -W html-xml-utils || sudo apt install html-xml-utils
5stale() { [ $(( $(date +%s) - $(stat -c%Y "$1") )) -gt $(( 60*60*12 )) ]; } 5stale() { [ $(( $(date +%s) - $(stat -c%Y "$1") )) -gt $(( 60*60*12 )) ]; }
6if [ -t 0 ]
7then
8 exec < fdroids.txt
9fi
6while read url 10while read url
7do 11do
8 case "$url" in 12 case "$url" in
@@ -23,4 +27,4 @@ do
23 (cd repo && wget -c "$link" "$link.asc" -a "$pkg".wget-log.txt) 27 (cd repo && wget -c "$link" "$link.asc" -a "$pkg".wget-log.txt)
24 fi 28 fi
25 fi 29 fi
26done < fdroids.txt 30done