annotate deploy/any/run-provisioning.sh @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +0100
parents 18643ab36008
children
rev   line source
Chris@1601 1 #!/bin/bash
Chris@1601 2
Chris@1601 3 mydir=$(dirname "$0")
Chris@1603 4 case "$mydir" in
Chris@1603 5 /*) ;;
Chris@1603 6 *) mydir=$(echo "$(pwd)/$mydir" | sed 's,/\./,/,g')
Chris@1603 7 esac
Chris@1601 8
Chris@1601 9 if [ "$mydir" != "/code-to-deploy/deploy/any" ]; then
Chris@1601 10 echo "ERROR: Expected repository to be at /code-to-deploy prior to provisioning"
Chris@1603 11 echo " (My directory is $mydir, expected /code-to-deploy/deploy/any)"
Chris@1601 12 exit 2
Chris@1601 13 fi
Chris@1601 14
Chris@1604 15 set -e
Chris@1604 16
Chris@1604 17 . "$mydir"/prepare.sh
Chris@1601 18
Chris@1601 19 for f in "$mydir"/../provision.d/[0-9]*.sh ; do
Chris@1601 20 case "$f" in
Chris@1601 21 *~) ;;
Chris@1601 22 *) echo "Running provisioning script: $f"
Chris@1605 23 /bin/bash "$f" </dev/null ;; # close stdin to avoid interactivity
Chris@1601 24 esac
Chris@1601 25 done
Chris@1601 26
Chris@1601 27 echo "All provisioning scripts complete"