sequencer - add subdir to fallback path

Fix standard sourcing
This commit is contained in:
2022-03-13 13:25:37 +01:00
parent 7b33585405
commit fb67ff42f4
2 changed files with 5 additions and 8 deletions

View File

@@ -1,12 +1,12 @@
#!/bin/bash
# Get script working directory
WDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >>/dev/null 2>&1 && pwd)"
WDIR="$(cd "$(dirname -- "$(realpath "${BASH_SOURCE[0]}")")" >>/dev/null 2>&1 && pwd)"
_sequencerCompletion() {
local SEQCOMP_LOC="${WDIR}/sqnall-completion.bash"
local SEQCOMP_LOADER="$HOME/.bashrc"
local SEQCOMP_SOURCE="source \"$SEQCOMP_LOC\""
local SEQCOMP_SOURCE=". \"$SEQCOMP_LOC\""
grep "$SEQCOMP_SOURCE" "$SEQCOMP_LOADER" >>/dev/null 2>&1
if [ $? -eq 0 ]; then