diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-02-20 15:44:53 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-02-20 15:44:53 -0300 |
commit | ff85837ac65caf15eae9f7d96fdc768f15b9fbd1 (patch) | |
tree | aa35ddf5425f4b467bde1a5a153398fe73d6bcd8 | |
parent | 9b8930e86a261891599c1d925d4a447805a59c34 (diff) | |
download | hydra-ff85837ac65caf15eae9f7d96fdc768f15b9fbd1.tar.gz hydra-ff85837ac65caf15eae9f7d96fdc768f15b9fbd1.tar.bz2 |
Removes trailing slash at REMOTE git URLs on init action
-rwxr-xr-x | share/hydra/init | 2 |
1 files changed, 2 insertions, 0 deletions
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 |