Updates gdl-update-todo.sh to force default behaviour

This commit is contained in:
Matheus Albino
2024-06-20 05:13:56 -03:00
parent 137f709e2f
commit 0d5c3c86f9

View File

@@ -3,22 +3,22 @@
# TODO, warning! This script is horrible and insecure with background jobs # TODO, warning! This script is horrible and insecure with background jobs
show_help() { show_help() {
echo "Usage: $0 [--abort-on-found|-a] [--parallel|-p] [--custom-grep-search|-c <string>]" echo "Usage: $0 [--no-abort-on-found] [--no-parallel] [--custom-grep-search|-c <string>]"
echo "Options:" echo "Options:"
echo " --abort-on-found|-a (optional) The script will update each gallery download until it finds an already downloaded file." echo " --no-abort-on-found (optional) The script will not update each gallery download until it finds an already downloaded file."
echo " --parallel|-a (optional) The script will update each gallery download in parallel, with background jobs." echo " --no-parallel (optional) The script will not update each gallery download in parallel, with background jobs."
echo " --custom-grep-search|-c (optional) Includes a string to filter the URLs." echo " --custom-grep-search|-c (optional) Includes a string to filter the URLs."
} }
should_abort_on_found=false should_abort_on_found=true
should_parallel_download=false should_parallel_download=true
custom_grep_search='' custom_grep_search=''
while [ "$#" -gt 0 ]; do while [ "$#" -gt 0 ]; do
case "$1" in case "$1" in
--help|-h) show_help; exit ;; --help|-h) show_help; exit ;;
--abort-on-found|-a) should_abort_on_found=true; shift ;; # --no-abort-on-found) should_abort_on_found=false; shift ;;
--parallel|-p) should_parallel_download=true; shift ;; # --no-parallel) should_parallel_download=false; shift ;;
--custom-grep-search|-c) custom_grep_search="$2"; shift 2 ;; --custom-grep-search|-c) custom_grep_search="$2"; shift 2 ;;
*) shift ;; *) shift ;;
esac esac