Support installation to different directoy
Introduce configuration file to set a custom seqs collection
This commit is contained in:
@@ -36,9 +36,19 @@ _sqnall_completions()
|
||||
}
|
||||
|
||||
installCompletion() {
|
||||
local SEQBASE="/opt/sequencer/seqs"
|
||||
# Get script working directory
|
||||
# (when called from a different directory)
|
||||
local WDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >>/dev/null 2>&1 && pwd)"
|
||||
|
||||
. ${WDIR}/sequencer.cfg &>/dev/null
|
||||
|
||||
local SEQBASE="${WDIR}/seqs"
|
||||
local SEQPREFIX="sqn_"
|
||||
local SEQSHORT=()
|
||||
|
||||
# Check for user selected sequences
|
||||
[ -e "$SEQUENCER_USER_SEQS" ] && SEQBASE="$SEQUENCER_USER_SEQS"
|
||||
|
||||
# Create aliases and command (alias) list for "complete" command"
|
||||
SEQLIST=($(ls "$SEQBASE/$cur"*.sh))
|
||||
for i in "${!SEQLIST[@]}"; do
|
||||
|
Reference in New Issue
Block a user