]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-upgrade.sh
- outdated in 1.5.4
[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 cat >&2 <<-EOF
10 Running eventum upgrade scripts to in $scriptdir
11 These will fail if your eventum user doesn't have ALTER privilege to database.
12
13 !!! Proceeding in 10 seconds !!!
14 EOF
15
16 sleep 10s
17 if [ -x /usr/bin/php4 ]; then
18         php=/usr/bin/php4
19 else
20         php=/usr/bin/php
21 fi
22
23 upgrade_script() {
24         script="$1"; shift
25
26         echo -n "Eventum upgrade: $@..."
27         if ! $php -q $scriptdir/$script; then
28                 echo >&2 ""
29                 echo >&2 "Please run manually: $php -q $scriptdir/$script"
30         fi
31         echo ""
32 }
33
34 while read script text; do
35         upgrade_script $script "$text"
36 done
This page took 0.04586 seconds and 3 git commands to generate.