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