From c9429cbf23826fb6552582708c1673b58644ff3f Mon Sep 17 00:00:00 2001 From: nemsia Date: Thu, 14 Jun 2018 15:25:03 +0200 Subject: [PATCH] Fix Upgrade --- scripts/upgrade | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a0ca482..18f4d8e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,14 +47,6 @@ if [[ "$admin" = "" || "$language" = "" ]]; then ynh_die fi -if [ "$(lsb_release --codename --short)" == "jessie" ]; then - echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list - ynh_secure_remove /etc/apt/sources.list.d/backports.list -fi - -# Add yarn repo -echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -69,11 +61,17 @@ ynh_clean_setup () { ynh_abort_if_errors #================================================= -# CHECK THE PATH +# Remove repo Files #================================================= -# Normalize the URL path syntax -#path_url=$(ynh_normalize_url_path $path_url) +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list + ynh_secure_remove /etc/apt/sources.list.d/backports.list +fi + +# Add yarn repo +echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list + #================================================= # INSTALL DEPENDENCIES