From 09f810e05313d765c24052bb0b2f627d295be505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Tue, 17 Nov 2015 12:28:48 +0100 Subject: [PATCH] [fix] Fail if system dependencies are not met --- install_yunohostv2 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install_yunohostv2 b/install_yunohostv2 index 14a10e8..da8db7a 100755 --- a/install_yunohostv2 +++ b/install_yunohostv2 @@ -168,12 +168,13 @@ setup_package_source() { echo "deb http://repo.yunohost.org/ megusta main" > $CUSTOMAPT else # Check current system version and dependencies - [[ $(lsb_release -c | awk '{print $2}') == jessie ]] \ - || (echo "Current testing release only works on Debian Jessie \ - for the moment." && exit 1) - [ -d /run/systemd/system ] \ - || (echo "Current testing release only works with systemd \ - for the moment." && exit 1) + if [[ $(lsb_release -c | awk '{print $2}') != jessie ]]; then + echo "Current $DISTRIB only works on Debian Jessie for the moment." + return 1 + elif [ ! -d /run/systemd/system ]; then + echo "Current $DISTRIB only works with systemd for the moment." + return 1 + fi # Make use of new repository local CUSTOMDEB="deb http://repo.yunohost.org/debian/ jessie stable"