From 649ead12578cf68f4cff8dbec4e025da689d340b Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 21 Mar 2020 11:54:45 +0000 Subject: [PATCH] fetch: fix showing already archived URLs --- bin/fetch.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/fetch.sh b/bin/fetch.sh index 5e26232..6542972 100644 --- a/bin/fetch.sh +++ b/bin/fetch.sh @@ -25,6 +25,11 @@ fetch_cmd() fi } +find_dir() +{ + find "$ARCHIVE_BASEDIR" -type d -name "$1" +} + torsocks=torsocks while getopts T flag; do case $flag in @@ -53,7 +58,7 @@ for url; do if grep -q "^$url\$" "$everything"; then printf "%s: \"%s\" already fetched.\n" "${0##*/}" "$url" >&2 - printf "%s\n" "$outdir/file" + printf "%s/file\n" "$(find_dir "$sha")" continue fi