1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00

[fix] Prevent the upgrade to overwrite the roundcube plugin-installer

This commit is contained in:
Jérôme Lebleu 2016-03-30 14:19:41 +02:00
parent 38585de5e5
commit 8f41144918
2 changed files with 10 additions and 1 deletions

View file

@ -91,6 +91,6 @@ init_composer() {
cp "${DESTDIR}/composer.json-dist" "${DESTDIR}/composer.json"
# update dependencies to create composer.lock
exec_composer "$AS_USER" "$DESTDIR" update --no-dev \
exec_composer "$AS_USER" "$DESTDIR" install --no-dev \
|| die "Unable to update Roundcube core dependencies"
}

View file

@ -29,6 +29,15 @@ DESTDIR="/var/www/$app"
TMPDIR=$(ynh_mkdir_tmp)
extract_roundcube "$TMPDIR"
# Check if composer is already used
if [[ -f ${DESTDIR}/composer.json ]]; then
# FIXME: Keep the installed roundcube plugin-installer and so installed.json
# composer file since 0.1.7 shipped version is buggy
cp -a "${DESTDIR}/vendor/composer/installed.json" "${TMPDIR}/vendor/composer"
cp -a "${DESTDIR}/vendor/roundcube/plugin-installer" \
"${TMPDIR}/vendor/roundcube"
fi
# Install the new Roundcube version
sudo php "${TMPDIR}/bin/installto.sh" "$DESTDIR" --force --accept \
|| die "Unable to update Roundcube installation"