Update various scripts

This commit is contained in:
Matheus Albino
2024-05-25 14:18:36 -03:00
parent c74973adaf
commit 94f5f68f97
3 changed files with 21 additions and 5 deletions

View File

@@ -1,5 +1,18 @@
#!/bin/bash
gallery-dl $1
media_url=$1
gallery-dl $media_url
cmd_exit_code=$?
if [[ $cmd_exit_code -ne 0 ]]; then
printf "\n"
echo "[ERROR] `basename $0`: Could not download url \"$media_url\""
echo "[ERROR] Exit status: $cmd_exit_code"
exit 1
fi
find gallery-dl -type f -exec mv '{}' . \;
rm --recursive gallery-dl