fetch: small fixes

- Use `sha256 -s` instead of piping into `sha256`
- Remove unused name output file
This commit is contained in:
Lucas 2021-04-11 14:32:18 +00:00
parent 489043a49d
commit 141a56f51b

View File

@ -53,7 +53,7 @@ mkdir -p "$dir" || exit 1
rc=0 rc=0
for url; do for url; do
sha=$(printf "%s" "$url" | sha256) sha=$(sha256 -qs "$url")
outdir=$dir/$sha outdir=$dir/$sha
if grep -q "^$url\$" "$everything"; then if grep -q "^$url\$" "$everything"; then
@ -67,7 +67,6 @@ for url; do
{ {
fetch_cmd -o "$outdir/file" "$url" && fetch_cmd -o "$outdir/file" "$url" &&
printf "%s\n" "$url" >"$outdir/url" && printf "%s\n" "$url" >"$outdir/url" &&
printf "%s\n" "$name" >"$outdir/name" &&
printf "%s\n" "$url" >>"$everything" && printf "%s\n" "$url" >>"$everything" &&
printf "%s\n" "$outdir/file" printf "%s\n" "$outdir/file"
} || rc=1 } || rc=1