]> gitweb.fluxo.info Git - hydra.git/commitdiff
Removes trailing slash at REMOTE git URLs on init action
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Feb 2017 18:44:53 +0000 (15:44 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Feb 2017 18:44:53 +0000 (15:44 -0300)
share/hydra/init

index 9979f9f6ae5b28fa074df0bcabca43bec5335d77..2920af4e587c9a21d5e2c9c7ed7a95da616dbe96 100755 (executable)
@@ -52,6 +52,8 @@ if [ ! -z "$REMOTE" ]; then
       if [ -e '.gitmodules' ] && grep -q \"config\" .gitmodules; then
         git submodule update --init $repo
       else
+        REMOTE="`echo $REMOTE | sed -e 's|/$||'`"
+
         if git ls-remote ${REMOTE}/$repo &> /dev/null; then
           git clone ${REMOTE}/$repo `basename $repo .git`
         else