From a78b89f6040b309b45c4ed8ca3c0f0ac57b020b1 Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 27 Mar 2019 01:11:01 +0100 Subject: [PATCH] Create pkg_dependencies variable --- scripts/_common.sh | 11 +++++++++++ scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1dadc0e..d572836 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,16 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +# dependencies used by the app +pkg_dependencies="build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev postgresql cpanminus" + +#================================================= +# FUTURE OFFICIAL HELPERS +#================================================= + # Start (or other actions) a service, print a log in case of failure and optionnaly wait until the service is completely started # # usage: ynh_systemd_action [-n service_name] [-a action] [ [-l "line to match"] [-p log_path] [-t timeout] [-e length] ] diff --git a/scripts/install b/scripts/install index 7729908..0a665fb 100644 --- a/scripts/install +++ b/scripts/install @@ -81,7 +81,7 @@ ynh_app_setting_set $app max_file_size $max_file_size #================================================= ynh_print_info "Installing dependencies..." -ynh_install_app_dependencies build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev postgresql cpanminus +ynh_install_app_dependencies $pkg_dependencies # Install Carton echo yes | cpanm Carton diff --git a/scripts/restore b/scripts/restore index 286e393..16d41ae 100644 --- a/scripts/restore +++ b/scripts/restore @@ -51,7 +51,7 @@ test ! -d $final_path \ ynh_print_info "Reinstalling dependencies..." # Define and install dependencies -ynh_install_app_dependencies build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev postgresql cpanminus +ynh_install_app_dependencies $pkg_dependencies # Install Carton echo yes | cpanm Carton diff --git a/scripts/upgrade b/scripts/upgrade index b9fd19b..44edd17 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -85,7 +85,7 @@ ynh_abort_if_errors #================================================= ynh_print_info "Upgrading source files..." -ynh_install_app_dependencies build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev postgresql cpanminus +ynh_install_app_dependencies $pkg_dependencies ynh_setup_source "$final_path"