From ff85837ac65caf15eae9f7d96fdc768f15b9fbd1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 20 Feb 2017 15:44:53 -0300 Subject: Removes trailing slash at REMOTE git URLs on init action --- share/hydra/init | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/hydra/init b/share/hydra/init index 9979f9f..2920af4 100755 --- a/share/hydra/init +++ b/share/hydra/init @@ -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 -- cgit v1.2.3