diff --git a/bin/clean-whiteboard-photos b/bin/clean-whiteboard-photos index 8d0646ea9..7ba421a88 100755 --- a/bin/clean-whiteboard-photos +++ b/bin/clean-whiteboard-photos @@ -33,17 +33,16 @@ clean_whiteboard_photos() { main() { # Check if ImageMagick's convert command-line tool is installed - if [ -x "$(command -v "convert")" ]; then - - while [ $# -ne 0 ]; do - clean_whiteboard_photos "$1" - shift - done - - else + if [ ! -x "$(command -v "convert")" ]; then printf "Please install ImageMagick's 'convert' command-line tool!" + exit; fi + while [ $# -ne 0 ]; do + clean_whiteboard_photos "$1" + shift + done + } -main $@ +main "$@" diff --git a/bin/get-compression-heatmap b/bin/get-compression-heatmap index 071d3af8b..0d2dd21a2 100755 --- a/bin/get-compression-heatmap +++ b/bin/get-compression-heatmap @@ -49,7 +49,7 @@ main() { # Check if `cURL` is installed if [ ! -x "$(command -v "curl")" ]; then - printf "Please install cURL!\n" + printf "cURL is required, please install it!\n" exit; fi @@ -57,7 +57,7 @@ main() { tmpFile="/tmp/$(mktemp -u XXXXX).gz" - # Check if the current command line arguments is a local file + # Check if the current command line argument is a local file if [ -f "$1" ]; then cmd="cat" diff --git a/bin/get-content-encoding b/bin/get-content-encoding index 980302c3e..7d394b4c4 100755 --- a/bin/get-content-encoding +++ b/bin/get-content-encoding @@ -2,8 +2,8 @@ # DESCRIPTION: # -# Provides the content encoding the specified -# resources are served with. +# Provides the content encoding the +# specified resources are served with. # # USAGE: # @@ -167,17 +167,19 @@ get_content_encoding() { main() { - # Check if cURL is installed - if [ -x "$(command -v "curl")" ]; then - while [ $# -ne 0 ]; do - get_content_encoding "$1" - shift - done - printf "\n" - else + # Check if `cURL` is installed + if [ ! -x "$(command -v "curl")" ]; then printf "cURL is required, please install it!\n" + exit; fi + while [ $# -ne 0 ]; do + get_content_encoding "$1" + shift + done + + printf "\n" + } -main $@ +main "$@"