]>
Commit | Line | Data |
---|---|---|
c83dfbdd ER |
1 | #!/bin/sh |
2 | ||
3 | scriptdir="$1" | |
4 | if [ ! -d "$scriptdir" ]; then | |
5 | echo >&2 "Missing scriptdir: $scriptdir" | |
6 | exit 1 | |
7 | fi | |
8 | ||
ff5fcb79 | 9 | echo >&2 "Running eventum upgrade scripts in $scriptdir" |
c83dfbdd | 10 | |
c83dfbdd ER |
11 | upgrade_script() { |
12 | script="$1"; shift | |
13 | ||
14 | echo -n "Eventum upgrade: $@..." | |
3451afe5 | 15 | if ! php -dmemory_limit=256M $scriptdir/$script; then |
c83dfbdd | 16 | echo >&2 "" |
03688434 | 17 | echo >&2 "Please run manually: php $scriptdir/$script" |
f44acf2a | 18 | echo >&2 "NOTE: You might need to add CREATE, DROP, ALTER and INDEX privileges to Eventum MySQL user for this to work". |
c83dfbdd ER |
19 | fi |
20 | echo "" | |
21 | } | |
22 | ||
23 | while read script text; do | |
24 | upgrade_script $script "$text" | |
25 | done |