To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / deploy / any / run-provisioning.sh @ 1612:2496b955f638
History | View | Annotate | Download (653 Bytes)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
|
| 3 |
mydir=$(dirname "$0") |
| 4 |
case "$mydir" in |
| 5 |
/*) ;; |
| 6 |
*) mydir=$(echo "$(pwd)/$mydir" | sed 's,/\./,/,g') |
| 7 |
esac |
| 8 |
|
| 9 |
if [ "$mydir" != "/code-to-deploy/deploy/any" ]; then |
| 10 |
echo "ERROR: Expected repository to be at /code-to-deploy prior to provisioning" |
| 11 |
echo " (My directory is $mydir, expected /code-to-deploy/deploy/any)" |
| 12 |
exit 2 |
| 13 |
fi |
| 14 |
|
| 15 |
set -e |
| 16 |
|
| 17 |
. "$mydir"/prepare.sh |
| 18 |
|
| 19 |
for f in "$mydir"/../provision.d/[0-9]*.sh ; do |
| 20 |
case "$f" in |
| 21 |
*~) ;; |
| 22 |
*) echo "Running provisioning script: $f" |
| 23 |
/bin/bash "$f" </dev/null ;; # close stdin to avoid interactivity |
| 24 |
esac |
| 25 |
done |
| 26 |
|
| 27 |
echo "All provisioning scripts complete" |