From 4e8f0b4a6d81f1827287a9c5ba9f4329f5bd1214 Mon Sep 17 00:00:00 2001 From: Danny Bautista Date: Fri, 7 Jun 2019 14:30:27 -0400 Subject: [PATCH] Use -n instead of ! -z --- scripts/deploy-ebook-to-www | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deploy-ebook-to-www b/scripts/deploy-ebook-to-www index fa9f6d24..28a015fb 100755 --- a/scripts/deploy-ebook-to-www +++ b/scripts/deploy-ebook-to-www @@ -12,7 +12,7 @@ EOF exit } die(){ printf "\033[0;7;31mError:\033[0m %s\n" "${1}" 1>&2; exit 1; } -require(){ command -v "$1" > /dev/null 2>&1 || { suggestion=""; if [ ! -z "$2" ]; then suggestion=" $2"; fi; die "$1 is not installed.${suggestion}"; } } +require(){ command -v "$1" > /dev/null 2>&1 || { suggestion=""; if [ -n "$2" ]; then suggestion=" $2"; fi; die "$1 is not installed.${suggestion}"; } } if [ $# -eq 1 ]; then if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then usage; fi fi # End boilerplate