diff options
author | Foppe Hemminga | 2015-07-07 13:45:53 +0200 |
---|---|---|
committer | Foppe Hemminga | 2015-07-07 13:45:53 +0200 |
commit | 2d69a264a1b22fda4c568e9754aeef5f1b5f6b79 (patch) | |
tree | c6f094526c48ba02186f8af595c33cc434ad50fe /zenphoto.install | |
download | aur-2d69a264a1b22fda4c568e9754aeef5f1b5f6b79.tar.gz |
Initial commit copy of AUR3
Diffstat (limited to 'zenphoto.install')
-rw-r--r-- | zenphoto.install | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/zenphoto.install b/zenphoto.install new file mode 100644 index 000000000000..5ed153399a7f --- /dev/null +++ b/zenphoto.install @@ -0,0 +1,40 @@ + +# Thanks to stackoverflow (Dennis Williamson Post) +vercomp () { + if [[ $1 == $2 ]] + then + return 0 + fi + local IFS=. + local i ver1=($1) ver2=($2) + for ((i=0; i<${#ver1[@]}; i++)) + do + if [[ -z ${ver2[i]} ]] + then + # fill empty fields in ver2 with zeros + ver2[i]=0 + fi + if ((10#${ver1[i]} > 10#${ver2[i]})) + then + return 1 + fi + if ((10#${ver1[i]} < 10#${ver2[i]})) + then + return 2 + fi + done + return 0 +} + +post_upgrade() { + vercomp "1.4.4-1" $2 + if (( "$?" <= "1" )); then + echo "WARNING: Architecture change in the package." + echo "In order to get it running again, please move the data in" + echo "the according directories in '/var/lib/zenphoto'." + fi; + echo + echo "In order to load config file in apache configuration, you may run:" + echo "echo 'Include /etc/webapps/zenphoto/apache.conf' >> /etc/httpd/conf/httpd.conf" +} + |