From 65069d9754b0bddb5427f40fcb1712e4f24926ee Mon Sep 17 00:00:00 2001 From: Francois B Date: Fri, 4 May 2018 01:40:19 +0200 Subject: [PATCH] addPPA fct bug fixed on search --- core_functions.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core_functions.sh b/core_functions.sh index 3aa711a..02c17f2 100644 --- a/core_functions.sh +++ b/core_functions.sh @@ -237,7 +237,11 @@ function updateSystem () { function addPPA () { typeset ret_code - if ! grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -q $*; then + prefix="ppa:" + str="$*" + str2search=${str#$prefix} + + if ! grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -q ${str2search}; then printf "[PPA] adding : $* " printf "\n[PPA] adding $*\n" &>> $logFile sudo add-apt-repository -y $* &>> $logFile