This commit is contained in:
2025-09-01 18:43:11 -06:00
parent 5e75b61dc1
commit b22bcb7bf8
+2 -2
View File
@@ -22,7 +22,7 @@ cat "$tmp_links_file" | \
# get default basename of downloaded file
file_basename=$(basename "$line")
# echo "Downloading $line to $outdir/$file_basename"
echo "Downloading $line" # to $outdir/$file_basename"
# download the file to a tmp
curl -s -o "$tmp_file_download" "$line"
@@ -42,7 +42,7 @@ cat "$tmp_links_file" | \
if [[ "$item" == "$type" ]]; then
# rename the downloaded file
new_name="$outdir/$namehash.$(echo ${exts_arr[$count]})"
echo -e "Saving $line to $new_name"
echo -e "\tto $new_name"
mv "$tmp_file_download" "$new_name"
if [ $? -ne 0 ]; then
echo -e "\nFailed to rename $tmp_file_download to $new_name\n\turl\n\t$line\n\ttype $type\n\tbase name: $file_basename\n"