From 00e51517af8262f9f33a6572d0256cfaa0c02f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jun 2024 09:20:10 +0200 Subject: [PATCH] cleaning --- scripts/remove | 5 ----- scripts/upgrade | 26 ++++++++------------------ 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/scripts/remove b/scripts/remove index 230370d..389ad29 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - ynh_remove_nodejs #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c632857..4e43242 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,29 +9,19 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=5 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=5 - - pushd $install_dir - chown -R $app:www-data "$install_dir" - git config --system --add safe.directory $install_dir +pushd $install_dir + chown -R $app:www-data "$install_dir" + git config --system --add safe.directory $install_dir - ynh_exec_as $app git fetch - ynh_exec_as $app git reset --hard --quiet $version_commit - ynh_exec_as $app git pull - popd -fi + ynh_exec_as $app git fetch + ynh_exec_as $app git reset --hard --quiet $version_commit + ynh_exec_as $app git pull +popd chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"