mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
[fix] Upgrade dependencies with v2 format
This commit is contained in:
parent
d386d90ff0
commit
7ff89a2525
1 changed files with 7 additions and 1 deletions
|
@ -104,11 +104,12 @@ current_major_version=${current_version%%.*}
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
# Define a function to execute commands with `occ`
|
||||||
exec_occ() {
|
exec_occ() {
|
||||||
|
local pkg_dependencies = ""
|
||||||
# Backward compatibility to upgrade from older versions
|
# Backward compatibility to upgrade from older versions
|
||||||
if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ]
|
if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ]
|
||||||
then
|
then
|
||||||
NEXTCLOUD_PHP_VERSION=$phpversion
|
NEXTCLOUD_PHP_VERSION=$phpversion
|
||||||
elif [ $current_major_version -ge 25 ]
|
elif [ $current_major_version -ge 24 ]
|
||||||
then
|
then
|
||||||
NEXTCLOUD_PHP_VERSION="8.1"
|
NEXTCLOUD_PHP_VERSION="8.1"
|
||||||
elif [ $current_major_version -ge 18 ]
|
elif [ $current_major_version -ge 18 ]
|
||||||
|
@ -117,6 +118,11 @@ exec_occ() {
|
||||||
else
|
else
|
||||||
NEXTCLOUD_PHP_VERSION="7.1"
|
NEXTCLOUD_PHP_VERSION="7.1"
|
||||||
fi
|
fi
|
||||||
|
if ! php$NEXTCLOUD_PHP_VERSION 2>/dev/null; then
|
||||||
|
local pkg_dependencies = ${dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps}
|
||||||
|
pkg_dependencies=${pkg_dependencies/$phpversion/$NEXTCLOUD_PHP_VERSION}
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
if
|
||||||
(cd "$install_dir" && ynh_exec_as "$app" \
|
(cd "$install_dir" && ynh_exec_as "$app" \
|
||||||
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue