commit 6b96a6d59c90ae1363732ddb9bcee14a0b8ff21f parent 3566669088b674cd6f8a5947941325c94c900cd5 Author: Christian Grothoff <christian@grothoff.org> Date: Sun, 15 Dec 2019 16:33:43 +0100 merge shell scripts Diffstat:
| D | bootstrap-buildmaster | | | 25 | ------------------------- |
| M | buildbot/make-buildbot-master.sh | | | 37 | ++++++++++++++++++++++++++++--------- |
2 files changed, 28 insertions(+), 34 deletions(-)
diff --git a/bootstrap-buildmaster b/bootstrap-buildmaster @@ -1,25 +0,0 @@ -#!/bin/bash - -# Bootstrap the Taler setup for the buildmaster. - -set -eu - -BRANCH=master -REPOS="deployment" - -cd $HOME - -for component in $REPOS; do - if ! test -d $HOME/$component; then - git clone git://git.taler.net/$component.git - fi -done - -for component in $REPOS; do - echo "Checking out $component to $BRANCH" - git -C $HOME/$component checkout $BRANCH -done - -if [[ ! -d worker ]]; then - buildbot-worker create-worker --umask=0o22 ~/worker localhost:9989 buildmaster-worker buildmaster-pass -fi diff --git a/buildbot/make-buildbot-master.sh b/buildbot/make-buildbot-master.sh @@ -1,20 +1,39 @@ #!/bin/bash +# Bootstrap the Taler setup for the buildmaster. + +set -eu + if ! test "buildbot-master" = $(whoami); then echo Only run as the 'buildbot-master' user. exit 1 fi cd -if test -d ./master; then - echo 'master' base directory exists, not touching it and exiting. - exit 0 -fi -if ! test -d $HOME/deployment; then - git clone git://git.taler.net/deployment.git +BRANCH=master +REPOS="deployment" + +cd $HOME + +for component in $REPOS; do + if ! test -d $HOME/$component; then + git clone git://git.taler.net/$component.git + fi +done + +for component in $REPOS; do + echo "Checking out $component to $BRANCH" + git -C $HOME/$component checkout $BRANCH +done + +if [[ ! -d ./master ]]; then + buildbot create-master master + cd master + ln -s ../deployment/buildbot/master.cfg + cd .. fi -buildbot create-master master -cd master -ln -s ../deployment/buildbot/master.cfg +if [[ ! -d worker ]]; then + buildbot-worker create-worker --umask=0o22 ~/worker localhost:9989 buildmaster-worker buildmaster-pass +fi