]> gitweb.fluxo.info Git - hydra.git/commitdiff
Minor fixes at init action
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Feb 2017 17:35:39 +0000 (14:35 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 20 Feb 2017 17:35:39 +0000 (14:35 -0300)
share/hydra/init

index a69e885a868c00ec223c2ceb4c0b6d89052c2401..0c33ad322fac8a3785f3fdf4f895c3dc9a5a82b8 100755 (executable)
@@ -38,12 +38,11 @@ fi
 
 # Clone configuration repository or setup a new hydra
 if [ ! -z "$REMOTE" ]; then
-  mkdir -p $BASEDIR
-
   # Try to clone the superproject first
   git clone $REMOTE $BASEDIR 2> /dev/null
 
   (
+    mkdir -p $BASEDIR
     cd $BASEDIR
 
     # Initialize only the required repositories
@@ -51,7 +50,7 @@ if [ ! -z "$REMOTE" ]; then
       if [ -e '.gitmodules' ] && grep -q \"config\" .gitmodules; then
         git submodule update --init $repo
       else
-        git clone ${REMOTE}$repo `basename $repo .git`
+        git clone ${REMOTE}/$repo `basename $repo .git`
       fi
     done
   )