diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-02-28 13:52:52 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-02-28 13:52:52 -0300 |
commit | 1d33d02bd37cb38b494991ca0f797dfcaea12e39 (patch) | |
tree | 8f559f0783f68522cc214a919706ea16f4793fac /share | |
parent | 173bd5c76143bf1e298106314f1577a94773ed9d (diff) | |
download | hydra-1d33d02bd37cb38b494991ca0f797dfcaea12e39.tar.gz hydra-1d33d02bd37cb38b494991ca0f797dfcaea12e39.tar.bz2 |
Create BASEDIR / doc update
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydra/init | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/share/hydra/init b/share/hydra/init index dbc2414..9b817d0 100755 --- a/share/hydra/init +++ b/share/hydra/init @@ -31,8 +31,14 @@ if [ -z "$BASEDIR" ]; then elif grep -q -e "^$HYDRA=" $CONFIG &> /dev/null; then echo "Hydra $HYDRA already defined" exit 1 +elif [ -d "$BASEDIR" ]; then + echo "Folder $BASEDIR already exists, hydra $HYDRA already defined?" + exit 1 fi +# Create base +mkdir -p $BASEDIR + # Reparse basedir to force absolute folder BASEDIR="`cd $BASEDIR && pwd`" @@ -44,8 +50,8 @@ echo "$HYDRA=\"$BASEDIR\"" >> $CONFIG # Optional remote configuration if [ ! -z "$REMOTE" ]; then - echo "Using $REMOTE as private gitolite address." - echo "PRIVATE_REPOS=$REMOTE" >> $PREFERENCES + # Clone configuration repository + git clone $REMOTE $BASEDIR/config else # No remote was given, so we assume this is a shiny new hydra! if [ ! -d "$BASEDIR/config" ]; then |