From 0d7f1464e503729a1fea7a5ef0fc0eb79a492fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 12 Jun 2018 21:14:10 +0200 Subject: [PATCH] Use lsb_release instead of if - else --- scripts/install | 7 +------ scripts/upgrade | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 9700d88..2770c98 100644 --- a/scripts/install +++ b/scripts/install @@ -142,12 +142,7 @@ mkdir -p $final_path # For any update do it in all files if [ -n "$(uname -m | grep arm)" ] then - if [ "$(lsb_release --codename --short)" == "jessie" ] - then - ynh_setup_source $final_path/ "armv7_jessie" - else - ynh_setup_source $final_path/ "armv7_stretch" - fi + ynh_setup_source $final_path/ "armv7_$(lsb_release --codename --short)" else # Install virtualenv if it don't exist test -e $final_path/bin || virtualenv -p python2.7 $final_path diff --git a/scripts/upgrade b/scripts/upgrade index de3bc70..f1d6fbc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,12 +82,7 @@ fi if [ -n "$(uname -m | grep arm)" ] then - if [ "$(lsb_release --codename --short)" == "jessie" ] - then - ynh_setup_source $final_path/ "armv7_jessie" - else - ynh_setup_source $final_path/ "armv7_stretch" - fi + ynh_setup_source $final_path/ "armv7_$(lsb_release --codename --short)" else # Install virtualenv if it don't exist test -e $final_path/bin || virtualenv -p python2.7 $final_path