installto.sh: Add possibility to run the update even on the up-to-date installation (#6533)

pull/6724/head
Aleksander Machniak 5 years ago
parent 02dc6ce41c
commit e3d3add48a

@ -7,6 +7,7 @@ CHANGELOG Roundcube Webmail
- Renamed 'log_session' option to 'session_debug'
- Password: Added ldap_exop driver (#4992)
- Don't log full session identifiers in userlogins log (#6625)
- installto.sh: Add possibility to run the update even on the up-to-date installation (#6533)
- Elastic: Add Prev/Next buttons on message page toolbar (#6648)
- Elastic: Close search options on Enter key press in quick-search input (#6660)
- Elastic: Changed read/unread icons (#6636)

@ -38,17 +38,23 @@ if (!preg_match('/define\(.RCMAIL_VERSION.,\s*.([0-9.]+[a-z-]*)/', $iniset, $m))
$oldversion = $m[1];
if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '>='))
rcube::raise_error("Installation at target location is up-to-date!", false, true);
if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '>'))
rcube::raise_error("Target installation already in version $oldversion.", false, true);
if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '==')) {
echo "Target installation already in version $oldversion. Do you want to update again? (y/N)\n";
}
else {
echo "Upgrading from $oldversion. Do you want to continue? (y/N)\n";
}
echo "Upgrading from $oldversion. Do you want to continue? (y/N)\n";
$input = trim(fgets(STDIN));
if (strtolower($input) == 'y') {
echo "Copying files to target location...";
$adds = array();
$dirs = array('program','bin','SQL','plugins','skins');
$dirs = array('bin','SQL','plugins','skins','program');
if (is_dir(INSTALL_PATH . 'vendor') && !is_file("$target_dir/composer.json")) {
$dirs[] = 'vendor';

Loading…
Cancel
Save