summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-20 08:53:48 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-20 08:53:48 +0100
commita079269166d120bcbcb33d34f4b1c8f60d102e32 (patch)
treec3ae8596608e94e58ab1624ef78b8ef33c5323a0 /bin
parenta8ffab3f4ff54af41c9041a30eb989954d6ffc17 (diff)
Fix version comparisons with -stable suffix (#1488876)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/installto.sh2
-rwxr-xr-xbin/update.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/installto.sh b/bin/installto.sh
index de96bf004..e6cf79d7d 100755
--- a/bin/installto.sh
+++ b/bin/installto.sh
@@ -35,7 +35,7 @@ if (!preg_match('/define\(.RCMAIL_VERSION.,\s*.([0-9.]+[a-z-]*)/', $iniset, $m))
$oldversion = $m[1];
-if (version_compare($oldversion, RCMAIL_VERSION, '>='))
+if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '>='))
die("Installation at target location is up-to-date!\n");
echo "Upgrading from $oldversion. Do you want to continue? (y/N)\n";
diff --git a/bin/update.sh b/bin/update.sh
index 59aa596dd..2015aa904 100755
--- a/bin/update.sh
+++ b/bin/update.sh
@@ -34,7 +34,7 @@ if (!$opts['version']) {
$opts['version'] = $input;
}
-if ($opts['version'] && version_compare($opts['version'], RCMAIL_VERSION, '>'))
+if ($opts['version'] && version_compare(version_parse($opts['version']), version_parse(RCMAIL_VERSION), '>'))
die("Nothing to be done here. Bye!\n");
@@ -169,7 +169,7 @@ if ($RCI->configured) {
}
// index contacts for fulltext searching
- if (version_compare($opts['version'], '0.6', '<')) {
+ if (version_compare(version_parse($opts['version']), '0.6.0', '<')) {
system(INSTALL_PATH . 'bin/indexcontacts.sh');
}