diff --git a/scripts/_common.sh b/scripts/_common.sh index e1c9af8..4169852 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,3 +3,8 @@ # Common variables # +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + pkg_dependencies="php5-gd" +else + pkg_dependencies="php-gd php-zip php-dom php-mbstring" +fi diff --git a/scripts/install b/scripts/install index e74d620..c6be758 100644 --- a/scripts/install +++ b/scripts/install @@ -62,10 +62,6 @@ ynh_app_setting_set "$app" is_public "$is_public" # INSTALL DEPENDENCIES #================================================= -pkg_dependencies="php-gd php-dom php-mbstring" -if [ "$(lsb_release --codename --short)" != "jessie" ]; then - pkg_dependencies="$pkg_dependencies php-zip" -fi ynh_install_app_dependencies $pkg_dependencies #================================================= diff --git a/scripts/restore b/scripts/restore index 91af4a5..b37c685 100644 --- a/scripts/restore +++ b/scripts/restore @@ -55,10 +55,6 @@ test ! -d $final_path \ #================================================= # Define and install dependencies -pkg_dependencies=php5-gd -if [ "$(lsb_release --codename --short)" != "jessie" ]; then - pkg_dependencies="$pkg_dependencies php-zip" -fi ynh_install_app_dependencies $pkg_dependencies #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8ad431d..992d464 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,10 +120,6 @@ ynh_add_fpm_config # INSTALL DEPENDENCIES #================================================= -pkg_dependencies=php5-gd -if [ "$(lsb_release --codename --short)" != "jessie" ]; then - pkg_dependencies="$pkg_dependencies php-zip" -fi ynh_install_app_dependencies $pkg_dependencies #=================================================