1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Use lsb_release instead of if - else

This commit is contained in:
Josué Tille 2018-06-12 21:14:10 +02:00 committed by Josue-T
parent b94f9f8299
commit 0d7f1464e5
2 changed files with 2 additions and 12 deletions

View file

@ -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

View file

@ -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