Commit | Line | Data |
---|---|---|
d3766f1a RB |
1 | #!/bin/bash |
2 | ||
3 | XDB=x5dat | |
4 | ||
5 | CRONDIR=$(dirname $0) | |
6 | SCRIPTPWD=$(pwd) | |
7 | PLATAL_ROOT=${CRONDIR}/../.. | |
8 | ||
9 | VERSION=$(grep VERSION ${PLATAL_ROOT}/ChangeLog | head -1 | sed -e "s/VERSION //;s/ .*//"); | |
10 | ||
11 | UPDATEDIR=${PLATAL_ROOT}/upgrade/${VERSION} | |
12 | UPDATESCRIPT=${UPDATEDIR}/update.sh | |
13 | ||
14 | echo "Running update script for version ${VERSION}"; | |
15 | ||
16 | if [[ -x ${UPDATESCRIPT} ]]; then | |
17 | cd ${UPDATEDIR} && NO_CONFIRM=1 DATABASE=${XDB} ./update.sh -u admin | |
18 | else | |
19 | echo "The update script ${UPDATESCRIPT} doesn't exist, aborting." | |
20 | fi | |
21 | ||
22 | cd ${SCRIPTPWD} | |
23 | ${CRONDIR}/run_tests.sh |