From 6d06d01e3404a5ef3273d76dc9f25f9dd16b5aff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 28 Apr 2020 19:39:09 +0200 Subject: [PATCH 1/3] remove nodejs --- scripts/_common.sh | 22 ++++++++++++++++++++++ scripts/remove | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 scripts/_common.sh diff --git a/scripts/_common.sh b/scripts/_common.sh new file mode 100644 index 0000000..3cfc4ff --- /dev/null +++ b/scripts/_common.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +#================================================= +# COMMON VARIABLES +#================================================= + +# dependencies used by the app +pkg_dependencies="postgresql apt-transport-https" + +nodejs_version=10 + +#================================================= +# PERSONAL HELPERS +#================================================= + +#================================================= +# EXPERIMENTAL HELPERS +#================================================= + +#================================================= +# FUTURE OFFICIAL HELPERS +#================================================= \ No newline at end of file diff --git a/scripts/remove b/scripts/remove index 1c60fab..80d18fb 100644 --- a/scripts/remove +++ b/scripts/remove @@ -6,6 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= +source _common.sh source /usr/share/yunohost/helpers #================================================= @@ -57,6 +58,8 @@ ynh_script_progression --message="Removing dependencies" # Remove metapackage and its dependencies ynh_remove_app_dependencies +ynh_remove_nodejs + #================================================= # REMOVE APP MAIN DIR #================================================= From 9bc75a59c9c9ec1edd6dc1781499d766637ccba5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 28 Apr 2020 19:39:38 +0200 Subject: [PATCH 2/3] add variables --- scripts/install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 98b906d..e9abb71 100644 --- a/scripts/install +++ b/scripts/install @@ -7,6 +7,7 @@ #================================================= source ynh_add_extra_apt_repos__3 +source _common.sh source /usr/share/yunohost/helpers #================================================= @@ -59,12 +60,12 @@ ynh_app_setting_set "$app" final_path "$final_path" #============================================== ynh_script_progression --message="Installing dependencies..." -ynh_install_app_dependencies postgresql apt-transport-https +ynh_install_app_dependencies $pkg_dependencies # Install Yarn ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" -ynh_install_nodejs 10 +ynh_install_nodejs --nodejs_version=$nodejs_version #============================================== # CREATE DB From c57edceb021c4315066f53861daed52a812025db Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 28 Apr 2020 19:58:45 +0200 Subject: [PATCH 3/3] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 3cfc4ff..7f52261 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="postgresql apt-transport-https" -nodejs_version=10 +nodejs_version="10" #================================================= # PERSONAL HELPERS