aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-02-20 15:44:53 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-02-20 15:44:53 -0300
commitff85837ac65caf15eae9f7d96fdc768f15b9fbd1 (patch)
treeaa35ddf5425f4b467bde1a5a153398fe73d6bcd8 /share
parent9b8930e86a261891599c1d925d4a447805a59c34 (diff)
downloadhydra-ff85837ac65caf15eae9f7d96fdc768f15b9fbd1.tar.gz
hydra-ff85837ac65caf15eae9f7d96fdc768f15b9fbd1.tar.bz2
Removes trailing slash at REMOTE git URLs on init action
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/init2
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