diff options
author | zachir <zachir@librem.one> | 2025-08-30 09:55:12 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2025-08-30 09:55:12 -0500 |
commit | a062b9fd9bcba2bbae0ab65453c7ceddce67b871 (patch) | |
tree | 9cab6f4b737c9b386824f2458d7e55aaf970411b /install.sh | |
parent | 1b94482d3b93a0ffbe3216765948a9c60b9d6a91 (diff) |
Shellcheck all the scripts
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |