summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydra/init10
1 files changed, 8 insertions, 2 deletions
diff --git a/share/hydra/init b/share/hydra/init
index 0c33ad3..2caf1c5 100755
--- a/share/hydra/init
+++ b/share/hydra/init
@@ -39,7 +39,9 @@ fi
# Clone configuration repository or setup a new hydra
if [ ! -z "$REMOTE" ]; then
# Try to clone the superproject first
- git clone $REMOTE $BASEDIR 2> /dev/null
+ if git ls-remote $REMOTE &> /dev/null; then
+ git clone $REMOTE $BASEDIR
+ fi
(
mkdir -p $BASEDIR
@@ -50,7 +52,11 @@ 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`
+ if git ls-remote ${REMOTE}/$repo &> /dev/null; then
+ git clone ${REMOTE}/$repo `basename $repo .git`
+ else
+ echo "Skipping unavailable ${REMOTE}/$repo..."
+ fi
fi
done
)