From f136823b269ce37b1a9f03ff00226cfb2472c642 Mon Sep 17 00:00:00 2001 From: Kload Date: Thu, 24 Oct 2013 12:06:40 +0200 Subject: [PATCH] Bugfixes --- autoinstall_yunohostv2 | 16 +++++++++------- install_yunohostv2 | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/autoinstall_yunohostv2 b/autoinstall_yunohostv2 index 2b08917..e6e4231 100755 --- a/autoinstall_yunohostv2 +++ b/autoinstall_yunohostv2 @@ -31,7 +31,7 @@ fi echo "Check dependencies" apt-get update -qq -for i in lsb-release wget whiptail +for i in lsb-release wget dialog whiptail do dpkg -l | grep -q $i if [[ $? -eq 1 ]] @@ -88,12 +88,14 @@ then echo "deb http://repo.yunohost.org/ megusta main" >> $CUSTOMAPT fi - if [[ "$1" == "test" ]]; then - grep -qri "test" $CUSTOMAPT - if [ $# -eq 1 ]; then - echo "deb http://repo.yunohost.org/ test main" >> $CUSTOMAPT - fi - fi + if [ $# -gt 0 ]; then + if [[ "$1" == "test" ]]; then + grep -qri "test" $CUSTOMAPT + if [ $# -eq 1 ]; then + echo "deb http://repo.yunohost.org/ test main" >> $CUSTOMAPT + fi + fi + fi #Get gpg key wget -O- http://repo.yunohost.org/yunohost.asc -q | apt-key add - -qq diff --git a/install_yunohostv2 b/install_yunohostv2 index b6362e2..72b782b 100755 --- a/install_yunohostv2 +++ b/install_yunohostv2 @@ -32,7 +32,7 @@ echo "======== YunoHost Installation ========" echo "======== Check dependences ========" apt-get update -qq -for i in lsb-release wget whiptail +for i in lsb-release wget dialog whiptail do dpkg -l | grep -q $i if [[ $? -eq 1 ]] @@ -90,12 +90,14 @@ then echo "deb http://repo.yunohost.org/ megusta main" >> $CUSTOMAPT fi - if [[ "$1" == "test" ]]; then - grep -qri "test" $CUSTOMAPT - if [ $# -eq 1 ]; then - echo "deb http://repo.yunohost.org/ test main" >> $CUSTOMAPT - fi - fi + if [ $# -gt 0 ]; then + if [[ "$1" == "test" ]]; then + grep -qri "test" $CUSTOMAPT + if [ $# -eq 1 ]; then + echo "deb http://repo.yunohost.org/ test main" >> $CUSTOMAPT + fi + fi + fi #Get gpg key wget -O- http://repo.yunohost.org/yunohost.asc -q | apt-key add - -qq