mv all files when using new thread dl location
This commit is contained in:
parent
84468952b9
commit
0ba9ae5b38
@ -225,7 +225,8 @@ add() {
|
|||||||
#only reason for bash here with process substitution
|
#only reason for bash here with process substitution
|
||||||
files="$(paste <(echo "$files_json" | jq '.filename' | tr -d '"') <(echo "$files_json" | jq '.location' | tr -d '"'))"
|
files="$(paste <(echo "$files_json" | jq '.filename' | tr -d '"') <(echo "$files_json" | jq '.location' | tr -d '"'))"
|
||||||
echo "$files" | while read -r file_line; do
|
echo "$files" | while read -r file_line; do
|
||||||
filename="$(echo "$file_line" | cut -f1 | tr ' ' '_')"
|
filename="$(echo "$file_line" | cut -f1 | tr ' ' '_' |
|
||||||
|
perl -C -MHTML::Entities -pe 'decode_entities($_);')"
|
||||||
mv -v "$dl_location_already/$filename" "$new_location"
|
mv -v "$dl_location_already/$filename" "$new_location"
|
||||||
done
|
done
|
||||||
rmdir --ignore-fail-on-non-empty "$dl_location_already"
|
rmdir --ignore-fail-on-non-empty "$dl_location_already"
|
||||||
|
Loading…
Reference in New Issue
Block a user