Commit a0e603a3 authored by Michael Kroes's avatar Michael Kroes Committed by Joshua Tauberer

Change z-push to use the git repository instead of the tar ball (#1305)

parent 88604074
......@@ -16,6 +16,7 @@ Mail:
Installer:
* We now run `apt-get autoremove` at the start of setup to clear out old packages, especially old kernels that take up a lot of space. On the first run, this step may take a long time.
* We now fetch z-push from their tagged git repository
v0.25 (November 15, 2017)
-------------------------
......
......@@ -22,27 +22,27 @@ apt_install \
phpenmod -v php7.0 imap
# Copy Z-Push into place.
TARGETHASH=aae5093212ac0b7d8bf2d79fd5b87ca5bbf091cb
VERSION=2.3.8
needs_update=0 #NODOC
if [ ! -f /usr/local/lib/z-push/version ]; then
needs_update=1 #NODOC
elif [[ $TARGETHASH != `cat /usr/local/lib/z-push/version` ]]; then
elif [[ $VERSION != `cat /usr/local/lib/z-push/version` ]]; then
# checks if the version
needs_update=1 #NODOC
fi
if [ $needs_update == 1 ]; then
wget_verify http://download.z-push.org/final/2.3/z-push-$VERSION.tar.gz $TARGETHASH /tmp/z-push.tar.gz
rm -rf /usr/local/lib/z-push
tar -xzf /tmp/z-push.tar.gz -C /usr/local/lib/
rm /tmp/z-push.tar.gz
mv /usr/local/lib/z-push-$VERSION /usr/local/lib/z-push
git_clone https://stash.z-hub.io/scm/zp/z-push.git $VERSION '' /tmp/z-push
mkdir /usr/local/lib/z-push
cp -r /tmp/z-push/src/* /usr/local/lib/z-push
rm -rf /tmp/z-push
rm -f /usr/sbin/z-push-{admin,top}
ln -s /usr/local/lib/z-push/z-push-admin.php /usr/sbin/z-push-admin
ln -s /usr/local/lib/z-push/z-push-top.php /usr/sbin/z-push-top
echo $TARGETHASH > /usr/local/lib/z-push/version
echo $VERSION > /usr/local/lib/z-push/version
fi
# Configure default config.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment