summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh9
1 files changed, 6 insertions, 3 deletions
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