From 7fee0a89e434f5f96fec75d500490782de2a56cb Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 28 Feb 2014 14:03:11 -0300 Subject: Create bootless repository on hydra init --- share/hydra/init | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/hydra/init b/share/hydra/init index d8408e6..82ce114 100755 --- a/share/hydra/init +++ b/share/hydra/init @@ -48,24 +48,26 @@ mkdir -p $BASEDIR chmod 700 $BASEDIR echo "$HYDRA=\"$BASEDIR\"" >> $CONFIG -# Optional remote configuration +# Clone configuration repository or setup a new hydra if [ ! -z "$REMOTE" ]; then - # Clone configuration repository git clone $REMOTE $BASEDIR/config else - # TODO: setup other repositories - # No remote was given, so we assume this is a shiny new hydra! + # Create config repository if [ ! -d "$BASEDIR/config" ]; then # Setup repository from template cp -r $APP_BASE/share/config $BASEDIR/config hydra_git_init $BASEDIR/config fi + # Create doc repository if [ ! -d "$BASEDIR/doc" ]; then mkdir -p "$BASEDIR/doc" echo "Use this repository for notes about Hydra $HYDRA" > $BASEDIR/doc/README.md hydra_git_init $BASEDIR/doc fi + + # Create bootless repository + hydra $HYDRA bootless init fi # Sync repositories -- cgit v1.2.3