diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-10-26 13:56:04 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-10-26 13:56:04 -0200 |
commit | d1f01e93686bb7ff33d480ac08add6728e39a860 (patch) | |
tree | 264c4c495b210324b5683c884d633615e49eea54 /share | |
parent | 5913f15132ce69dda1c7af04fd0c83b573f7171d (diff) | |
download | hydra-d1f01e93686bb7ff33d480ac08add6728e39a860.tar.gz hydra-d1f01e93686bb7ff33d480ac08add6728e39a860.tar.bz2 |
Init: use superproject repo
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. |