diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydra/init | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/share/hydra/init b/share/hydra/init index 138c5bd..4a6d0c1 100755 --- a/share/hydra/init +++ b/share/hydra/init @@ -36,21 +36,23 @@ elif [ -d "$BASEDIR" ]; then exit 1 fi -# Create base -mkdir -p $BASEDIR - -# Reparse basedir to force absolute folder -BASEDIR="`cd $BASEDIR && pwd`" - -# Add entry -echo "Registering hydra $HYDRA..." -chmod 700 $BASEDIR -echo "$HYDRA=\"$BASEDIR\"" >> $CONFIG - # Clone configuration repository or setup a new hydra if [ ! -z "$REMOTE" ]; then - git clone $REMOTE $BASEDIR/config + git clone $REMOTE $BASEDIR + + ( + cd $BASEDIR + + # Initialize only the required repositories + for repo in $BASEREPOS; do + git submodule update --init $repo + done + ) else + # Create the superproject + mkdir -p $BASEDIR + hydra_git_init $BASEDIR + # Create config repository if [ ! -d "$BASEDIR/config" ]; then # Setup repository from template @@ -82,6 +84,14 @@ else fi fi +# Reparse basedir to force absolute folder +BASEDIR="`cd $BASEDIR && pwd`" + +# Add entry +echo "Registering hydra $HYDRA..." +chmod 700 $BASEDIR +echo "$HYDRA=\"$BASEDIR\"" >> $CONFIG + cat<<-EOF Hydra suite relies heavilly in the address in the form of "admin.example.org" as the repository server which hosts configuration. |