From a062b9fd9bcba2bbae0ab65453c7ceddce67b871 Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 30 Aug 2025 09:55:12 -0500 Subject: Shellcheck all the scripts --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index efc198b..197ea0d 100755 --- a/install.sh +++ b/install.sh @@ -31,7 +31,10 @@ while getopts "cdhsSu:" o; do case "${o}" in ;; s) ___USE_SSH=y ;; S) unset ___USE_SSH ;; - u) URL="$OPTARG" ;; + u) + SSH_BASE_URL="$OPTARG" + HTTP_BASE_URL="$OPTARG" + ;; *) printhelp ;; esac done @@ -42,7 +45,7 @@ clone_dir () { printf "%s already exists, but not as a dir; not adding.\n" "$1" else if [ -n "$2" ]; then - printf "Cloning %s %s using ssh; will be read-write\nNote: only my ssh key will clone it\n" "$1" + printf "Cloning %s using ssh; will be read-write\nNote: only my ssh key will clone it\n" "$1" git clone "$SSH_BASE_URL$1.git" "$1" else printf "Cloning %s using http; will be read-only\n" "$1" @@ -51,7 +54,7 @@ clone_dir () { fi } -echo "$SCRIPT_DIRS" | while read i; do +echo "$SCRIPT_DIRS" | while read -r i; do [ -z "$i" ] && continue clone_dir "$i" "$___USE_SSH" done -- cgit v1.2.3