fetch: small fixes
- Use `sha256 -s` instead of piping into `sha256` - Remove unused name output file
This commit is contained in:
parent
489043a49d
commit
141a56f51b
@ -53,7 +53,7 @@ mkdir -p "$dir" || exit 1
|
||||
|
||||
rc=0
|
||||
for url; do
|
||||
sha=$(printf "%s" "$url" | sha256)
|
||||
sha=$(sha256 -qs "$url")
|
||||
outdir=$dir/$sha
|
||||
|
||||
if grep -q "^$url\$" "$everything"; then
|
||||
@ -67,7 +67,6 @@ for url; do
|
||||
{
|
||||
fetch_cmd -o "$outdir/file" "$url" &&
|
||||
printf "%s\n" "$url" >"$outdir/url" &&
|
||||
printf "%s\n" "$name" >"$outdir/name" &&
|
||||
printf "%s\n" "$url" >>"$everything" &&
|
||||
printf "%s\n" "$outdir/file"
|
||||
} || rc=1
|
||||
|
Loading…
Reference in New Issue
Block a user