Fix quoting and indexing bug in git-for-steve.sh
authorSteve Youngs <steve@sxemacs.org>
Sun, 28 Jun 2015 05:40:19 +0000 (15:40 +1000)
committerSteve Youngs <steve@sxemacs.org>
Sun, 28 Jun 2015 05:40:19 +0000 (15:40 +1000)
* contrib/git-for-steve.sh (set_myremote): Remove quotes from
REMOTES value.  And index counts from zero, not one.

Signed-off-by: Steve Youngs <steve@sxemacs.org>
contrib/git-for-steve.sh

index 03e0fa6..e6fd4aa 100755 (executable)
@@ -257,13 +257,13 @@ one already.
                             Hit [RETURN] to continue, or C-c to abort.
 EOF
     read junk
-    REMOTES=("$(git remote | grep -v origin)")
+    REMOTES=($(git remote | grep -v origin))
     echo
     echo "**[Remotes]***********************************************************"
     echo "          Currently configured remotes (possibly empty list)"
     echo
-    for (( i = 1; i <= ${#REMOTES}; i++ )); do
-       echo -n "\t"${i} -- ${REMOTES[${i}]}" at: "
+    for (( i = 0; i <= ${#REMOTES}; i++ )); do
+       echo -en "\t"${i} -- ${REMOTES[${i}]}" at: "
        echo $(git config remote.${REMOTES[${i}]}.url)
     done
     echo