From 3182b61b98e8e887cc92baa0c0941df138036d7e Mon Sep 17 00:00:00 2001 From: Lazarus Lazaridis Date: Mon, 12 Mar 2018 08:12:54 +0200 Subject: [PATCH] Fix shellcheck errors and warnings. --- install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install b/install index 902a72a..877fc8b 100755 --- a/install +++ b/install @@ -27,10 +27,12 @@ function _goto_install_error() if [ -n "$RC" ]; then # Append source to RC startup file if not already there - if [ `grep -c "source $GOTO_FILE_LOCATION" "$RC"` == "0" ]; then + if [ "$(grep -c "source $GOTO_FILE_LOCATION" "$RC")" == "0" ]; then # Append source to RC file - echo -e "\n#Source goto\nsource $GOTO_FILE_LOCATION\n" >> "$RC" + echo -e "\\n#Source goto\\nsource $GOTO_FILE_LOCATION\\n" >> "$RC" fi + + # shellcheck source=/dev/null source "$GOTO_FILE_LOCATION" else _goto_install_error "Error sourcing goto in your startup file.."