1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

if an earlier version of roundcube had already been installed, update to our target version

fixes #195
This commit is contained in:
Joshua Tauberer 2014-09-24 12:46:42 +00:00
parent 5a89f3c633
commit 8e0967dd8e

View File

@ -28,14 +28,24 @@ apt_install \
# Now that we're beyond that, get rid of those debs before installing from source. # Now that we're beyond that, get rid of those debs before installing from source.
apt-get purge -qq -y roundcube* apt-get purge -qq -y roundcube*
# Install Roundcube from source if it is not already present. # Install Roundcube from source if it is not already present or if it is out of date.
# TODO: Check version? VERSION=1.0.2
if [ ! -d /usr/local/lib/roundcubemail ]; then needs_update=0 #NODOC
if [ ! -f /usr/local/lib/roundcubemail/version ]; then
# not installed yet
needs_update=1 #NODOC
elif [[ $VERSION != `cat /usr/local/lib/roundcubemail/version` ]]; then
# checks if the version is what we want
needs_update=1 #NODOC
fi
if [ $needs_update == 1 ]; then
echo installing roudcube webmail $VERSION...
rm -f /tmp/roundcube.tgz rm -f /tmp/roundcube.tgz
wget -qO /tmp/roundcube.tgz http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.0.2/roundcubemail-1.0.2.tar.gz wget -qO /tmp/roundcube.tgz http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.0.2/roundcubemail-$VERSION.tar.gz
tar -C /usr/local/lib -zxf /tmp/roundcube.tgz tar -C /usr/local/lib -zxf /tmp/roundcube.tgz
mv /usr/local/lib/roundcubemail-1.0.2/ /usr/local/lib/roundcubemail mv /usr/local/lib/roundcubemail-$VERSION/ /usr/local/lib/roundcubemail
rm -f /tmp/roundcube.tgz rm -f /tmp/roundcube.tgz
echo $VERSION > /usr/local/lib/roundcubemail/version
fi fi
# ### Configuring Roundcube # ### Configuring Roundcube