Fix shellcheck errors and warnings.

This commit is contained in:
Lazarus Lazaridis 2018-03-12 08:12:54 +02:00
parent 75835c36e4
commit 3182b61b98

View File

@ -27,10 +27,12 @@ function _goto_install_error()
if [ -n "$RC" ]; then if [ -n "$RC" ]; then
# Append source to RC startup file if not already there # 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 # 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 fi
# shellcheck source=/dev/null
source "$GOTO_FILE_LOCATION" source "$GOTO_FILE_LOCATION"
else else
_goto_install_error "Error sourcing goto in your startup file.." _goto_install_error "Error sourcing goto in your startup file.."