summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2025-09-18 09:19:14 -0500
committerzachir <zachir@librem.one>2025-09-18 09:19:14 -0500
commit7d8eb3dab7d9835316d93af05cae78ef750083b0 (patch)
treed2f30af909aae617ef7e623b41c794c53619ef11
parent81dd1e37b24fcefe40481ce1d8abfccd6c57f954 (diff)
Close with printhelp() and add opt error codeHEADmaster
-rwxr-xr-xinstall.sh2
1 files changed, 2 insertions, 0 deletions
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