]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-upgrade.sh
- fix upgrade dir
[packages/eventum.git] / eventum-upgrade.sh
1 #!/bin/sh
2
3 scriptdir="$1"
4 if [ ! -d "$scriptdir" ]; then
5         echo >&2 "Missing scriptdir: $scriptdir"
6         exit 1
7 fi
8
9 echo >&2 "Running eventum upgrade scripts in $scriptdir"
10
11 upgrade_script() {
12         script="$1"; shift
13
14         echo -n "Eventum upgrade: $@..."
15         if ! php -dmemory_limit=256M $scriptdir/$script; then
16                 echo >&2 ""
17                 echo >&2 "Please run manually: php $scriptdir/$script"
18                 echo >&2 "NOTE: You might need to add CREATE, DROP, ALTER and INDEX privileges to Eventum MySQL user for this to work".
19         fi
20         echo ""
21 }
22
23 while read script text; do
24         upgrade_script $script "$text"
25 done
This page took 0.032416 seconds and 3 git commands to generate.