From 604e702e2a155b33c2f217f1f4931188344d4926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilon=20Sj=C3=B6gren?= Date: Thu, 10 Sep 2015 13:52:01 +0200 Subject: [PATCH] Should add source_line properly for bashrc --- binscripts/gvm-installer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binscripts/gvm-installer b/binscripts/gvm-installer index a6ccf34..41a78f5 100755 --- a/binscripts/gvm-installer +++ b/binscripts/gvm-installer @@ -11,9 +11,9 @@ display_error() { update_profile() { [ -f "$1" ] || return 1 - grep "$source_line" "$1" > /dev/null 2>&1 + grep -F "$source_line" "$1" > /dev/null 2>&1 if [ $? -ne 0 ]; then - echo "$source_line" >> "$1" + echo -e "\n$source_line" >> "$1" fi } @@ -89,7 +89,7 @@ popd > /dev/null [ -z "$GVM_NO_GIT_BAK" ] && mv "$GVM_DEST/$GVM_NAME/.git" "$GVM_DEST/$GVM_NAME/git.bak" -source_line="\n[[ -s \"${GVM_DEST}/$GVM_NAME/scripts/gvm\" ]] && source \"${GVM_DEST}/$GVM_NAME/scripts/gvm\"" +source_line="[[ -s \"${GVM_DEST}/$GVM_NAME/scripts/gvm\" ]] && source \"${GVM_DEST}/$GVM_NAME/scripts/gvm\"" source_file="${GVM_DEST}/$GVM_NAME/scripts/gvm" if [ -z "$GVM_NO_UPDATE_PROFILE" ] ; then