mirror of
https://github.com/iridakos/goto.git
synced 2025-05-15 23:10:35 -07:00
Fix shellcheck errors and warnings.
This commit is contained in:
parent
75835c36e4
commit
3182b61b98
6
install
6
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.."
|
||||
|
Loading…
x
Reference in New Issue
Block a user