From 7d8eb3dab7d9835316d93af05cae78ef750083b0 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 18 Sep 2025 09:19:14 -0500 Subject: Close with printhelp() and add opt error code --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index 9138eff..ef3352a 100755 --- a/install.sh +++ b/install.sh @@ -25,6 +25,7 @@ printhelp () { printf " -h) prints this help message\n" printf " -u X ) will clone using X as the URL\n" printf " -U) updates the repos rather than clones\n" + exit ${1:-1} } while getopts "cdhsSu:U" o; do case "${o}" in @@ -40,6 +41,7 @@ while getopts "cdhsSu:U" o; do case "${o}" in HTTP_BASE_URL="$OPTARG" ;; U) UPDATE="y" ;; + h) printhelp 0 ;; *) printhelp ;; esac done -- cgit v1.2.3