From a0025ab1dbaa7740ccdbefa58d4357c859692583 Mon Sep 17 00:00:00 2001 From: Matheus Albino Date: Wed, 26 Jun 2024 15:45:39 -0300 Subject: [PATCH] Scripts will display only filename instead of full path in echo messages --- scripts/shell/dockerhub-image-list-tags.sh | 2 +- scripts/shell/ffmpeg-get-video-res.sh | 2 +- scripts/shell/ffmpeg-helper.sh | 2 +- scripts/shell/gdl-queuer.sh | 4 ++-- scripts/shell/gdl-update-todo.sh | 4 ++-- .../job/gp/disable-dbversion-check-on-software-info-file.sh | 2 +- scripts/shell/job/gp/explode-java-files.sh | 2 +- scripts/shell/job/gp/gp-kill.sh | 2 +- scripts/shell/job/gp/install-gp.sh | 2 +- scripts/shell/job/gp/team-pipeline-local.sh | 2 +- scripts/shell/mmm-iterate-modlist.sh | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/shell/dockerhub-image-list-tags.sh b/scripts/shell/dockerhub-image-list-tags.sh index b81adf9..841dd69 100755 --- a/scripts/shell/dockerhub-image-list-tags.sh +++ b/scripts/shell/dockerhub-image-list-tags.sh @@ -8,7 +8,7 @@ check_command_availability() { } if [ -z "$1" ]; then - echo "Usage: $0 [-s] [-o ]" + echo "Usage: `basename $0` [-s] [-o ]" exit 1 fi diff --git a/scripts/shell/ffmpeg-get-video-res.sh b/scripts/shell/ffmpeg-get-video-res.sh index 479f229..7f756de 100755 --- a/scripts/shell/ffmpeg-get-video-res.sh +++ b/scripts/shell/ffmpeg-get-video-res.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ $# -ne 1 ]; then - echo "Usage: $0 " + echo "Usage: `basename $0` " exit 1 fi diff --git a/scripts/shell/ffmpeg-helper.sh b/scripts/shell/ffmpeg-helper.sh index 3c0c04f..0468329 100755 --- a/scripts/shell/ffmpeg-helper.sh +++ b/scripts/shell/ffmpeg-helper.sh @@ -1,7 +1,7 @@ #!/bin/bash show_help() { - echo "Usage: $0 [--input|-i input_file] [--crop|-c width:height] [--trim-start start] [--trim-end end] [--crf crf_value] [--fps new_fps] [--scale640] [--merge-audio] [--remove-audio] --output|-o output_file" + echo "Usage: `basename $0` [--input|-i input_file] [--crop|-c width:height] [--trim-start start] [--trim-end end] [--crf crf_value] [--fps new_fps] [--scale640] [--merge-audio] [--remove-audio] --output|-o output_file" echo "Options:" echo " --input|-i Specify the input video file (required)." echo " --crop|-c Specify the width:height for video cropping." diff --git a/scripts/shell/gdl-queuer.sh b/scripts/shell/gdl-queuer.sh index 3509b61..7d925a8 100755 --- a/scripts/shell/gdl-queuer.sh +++ b/scripts/shell/gdl-queuer.sh @@ -14,7 +14,7 @@ while getopts "f:c:" opt; do command="$OPTARG" ;; \?) - echo "Usage: $0 -f -c " + echo "Usage: `basename $0` -f -c " exit 1 ;; esac @@ -22,7 +22,7 @@ done # Check if both parameters are provided if [ -z "$queue_file" ] || [ -z "$command" ]; then - echo "Usage: $0 -f -c " + echo "Usage: `basename $0` -f -c " exit 1 fi diff --git a/scripts/shell/gdl-update-todo.sh b/scripts/shell/gdl-update-todo.sh index 978723b..2067bdf 100755 --- a/scripts/shell/gdl-update-todo.sh +++ b/scripts/shell/gdl-update-todo.sh @@ -3,8 +3,8 @@ # TODO, warning! This script is horrible and insecure with background jobs show_help() { - # echo "Usage: $0 [--no-abort-on-found] [--parallel] [--custom-grep-search|-c ]" - echo "Usage: $0 [--custom-grep-search|-c ]" + # echo "Usage: `basename $0` [--no-abort-on-found] [--parallel] [--custom-grep-search|-c ]" + echo "Usage: `basename $0` [--custom-grep-search|-c ]" echo "Options:" # echo " --no-abort-on-found (optional) The script will not update each gallery download until it finds an already downloaded file." # echo " --parallel-jobs (optional) The script will update each gallery download in parallel, with multiple background jobs running on your operating system." diff --git a/scripts/shell/job/gp/disable-dbversion-check-on-software-info-file.sh b/scripts/shell/job/gp/disable-dbversion-check-on-software-info-file.sh index 891542c..1e1b06a 100755 --- a/scripts/shell/job/gp/disable-dbversion-check-on-software-info-file.sh +++ b/scripts/shell/job/gp/disable-dbversion-check-on-software-info-file.sh @@ -1,7 +1,7 @@ #!/bin/bash show_help() { - echo "Usage: $0 [--files|-f files]" + echo "Usage: `basename $0` [--files|-f files]" echo "Options:" echo " --help | -h (Optional) Display help information on how to use this script" echo " --deployments-dir | -d (Required) Specify the Wildfly's deployment directory" diff --git a/scripts/shell/job/gp/explode-java-files.sh b/scripts/shell/job/gp/explode-java-files.sh index c18b9a7..156ead9 100755 --- a/scripts/shell/job/gp/explode-java-files.sh +++ b/scripts/shell/job/gp/explode-java-files.sh @@ -2,7 +2,7 @@ show_help() { - echo "Usage: $0 [--files|-f files]" + echo "Usage: `basename $0` [--files|-f files]" echo "Options:" echo " --help | -h (Optional) Display help information on how to use this script" echo " --files | -f (Optional) Specify the files to explode, separation by comma (,)" diff --git a/scripts/shell/job/gp/gp-kill.sh b/scripts/shell/job/gp/gp-kill.sh index f61e0f2..97b9e22 100755 --- a/scripts/shell/job/gp/gp-kill.sh +++ b/scripts/shell/job/gp/gp-kill.sh @@ -1,7 +1,7 @@ #!/bin/bash show_help() { - echo "Usage: $0 [--grep-str|-g string]" + echo "Usage: `basename $0` [--grep-str|-g string]" echo "Options:" echo " --help | -h (Optional) Display help information on how to use this script" echo " --grep-str | -g (Optional) Specify a customized string for grepping the process description" diff --git a/scripts/shell/job/gp/install-gp.sh b/scripts/shell/job/gp/install-gp.sh index fee02fb..16d62d3 100755 --- a/scripts/shell/job/gp/install-gp.sh +++ b/scripts/shell/job/gp/install-gp.sh @@ -1,7 +1,7 @@ #!/bin/bash show_help() { - echo "Usage: $0 [--files|-f files]" + echo "Usage: `basename $0` [--files|-f files]" echo "Options:" echo " --help | -h (Optional) Display help information on how to use this script" echo " --version | --version (Required) Specify the GP version to install" diff --git a/scripts/shell/job/gp/team-pipeline-local.sh b/scripts/shell/job/gp/team-pipeline-local.sh index 7697b42..35980a9 100755 --- a/scripts/shell/job/gp/team-pipeline-local.sh +++ b/scripts/shell/job/gp/team-pipeline-local.sh @@ -3,7 +3,7 @@ printf "\n" show_help() { - echo "Usage: $0 [--commit-hashes|-c commit hashes] [--deployments-path|-d deployments path]" + echo "Usage: `basename $0` [--commit-hashes|-c commit hashes] [--deployments-path|-d deployments path]" echo "Options:" echo " --help | -h (Optional) Display help information on how to use this script" echo " --commit-hashes | -c (Required) Specify the commit hashes, separation by comma (,)" diff --git a/scripts/shell/mmm-iterate-modlist.sh b/scripts/shell/mmm-iterate-modlist.sh index e8bdcfc..5ca45c7 100755 --- a/scripts/shell/mmm-iterate-modlist.sh +++ b/scripts/shell/mmm-iterate-modlist.sh @@ -1,7 +1,7 @@ #!/bin/bash show_help() { - echo "Usage: $0 [--mods-names|-m mods] [--include-default-mods|-d true] [--interactive-mode|-i true]" + echo "Usage: `basename $0` [--mods-names|-m mods] [--include-default-mods|-d true] [--interactive-mode|-i true]" echo "Options:" echo " --mods-names|-m (required) Specify mods names list, separation by comma (,)." echo " Run \"--use-ids true\" to use ids instead of names for mod installations"