summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-02-27 18:41:16 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-02-27 18:41:16 -0300
commit022dfee473c804af2f3bf01065a49250d2074db2 (patch)
tree3f0d658895ef27504fd223d82620f5816ff13237
parent19ecf71acfab42e6b1ea67fbd28010aec6c1ee05 (diff)
downloadhydra-022dfee473c804af2f3bf01065a49250d2074db2.tar.gz
hydra-022dfee473c804af2f3bf01065a49250d2074db2.tar.bz2
Create config and doc repositories
-rw-r--r--README6
-rwxr-xr-xshare/hydra/init19
2 files changed, 22 insertions, 3 deletions
diff --git a/README b/README
index b01c655..ab107b2 100644
--- a/README
+++ b/README
@@ -4,15 +4,15 @@ Hydra Process Command Tool
This suite is made of three commands:
- hydractl: issues commands in the current host.
- - hydra: issues commands on multiple hosts.
- - hydras: issues commands to multiple sets of hosts.
+ - hydra: issues commands on multiple hosts.
+ - hydras: issues commands to multiple sets of hosts.
TODO
----
Hydra:
- - Init: create config repository.
+ - Init: create config and doc repositories.
- Init: generate puppet repository using "hydractl bootstrap repository"
- Sync: clone hydra configuration repository that should be created by the new init action.
- Sync: split between public and private repositories.
diff --git a/share/hydra/init b/share/hydra/init
index 5ac6f82..ad2f065 100755
--- a/share/hydra/init
+++ b/share/hydra/init
@@ -46,6 +46,25 @@ echo "$HYDRA=\"$BASEDIR\"" >> $CONFIG
if [ ! -z "$REMOTE" ]; then
echo "Using $REMOTE as private gitolite address."
echo "PRIVATE_REPOS=$REMOTE" >> $PREFERENCES
+else
+ # TODO: setup remotes and README content
+ # No remote was given, so we assume this is a shiny new hydra!
+ mkdir $BASEDIR/{config,doc}
+ (
+ cd $BASEDIR/config
+ touch README.md
+ git init
+ git add .
+ git commit -m "Initial import"
+ )
+
+ (
+ cd $BASEDIR/doc
+ touch README.md
+ git init
+ git add .
+ git commit -m "Initial import"
+ )
fi
# Sync repositories