shellchecked

This commit is contained in:
2022-03-16 01:06:35 +01:00
parent 739a4b1e7c
commit d57d7b2c0b
2 changed files with 16 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Get script working directory
sq_dir="$(cd "$(dirname -- "$(realpath "${BASH_SOURCE[0]}")")" >>/dev/null 2>&1 && pwd)"
@@ -8,14 +8,14 @@ _sequencerCompletion() {
local SEQCOMP_LOADER="$HOME/.bashrc"
local SEQCOMP_SOURCE=". \"$SEQCOMP_LOC\""
grep "$SEQCOMP_SOURCE" "$SEQCOMP_LOADER" >>/dev/null 2>&1
if [ $? -eq 0 ]; then
if grep "$SEQCOMP_SOURCE" "$SEQCOMP_LOADER" >>/dev/null 2>&1; then
echo " [I] Completion already installed ($SEQCOMP_LOADER)"
else
echo "$SEQCOMP_SOURCE" >>"$SEQCOMP_LOADER"
[ $? -eq 0 ] && echo " [I] Sequence bash-completion installed"
echo " [I] Sequence bash-completion installed"
fi
source "$SEQCOMP_LOC"
# shellcheck source=sqn-completion.bash
. "$SEQCOMP_LOC"
}
_sequencerCompletion