Skip to content

Commit

Permalink
Updated method of finding script directory so commands can be loaded …
Browse files Browse the repository at this point in the history
…when the main script is symlinked into the path
  • Loading branch information
stephen-cox committed Jun 15, 2016
1 parent cfaaee1 commit 0e5ac23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/ddd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ function confirm() {

# Initialise metadata and load commands
declare -A MODULES
CWD="$(dirname "$0")"
THIS=$(readlink -f "${BASH_SOURCE[0]}")
CWD=$(dirname "${THIS}")
for F in ${CWD}/commands/*.sh; do
source $F
done
Expand Down

0 comments on commit 0e5ac23

Please sign in to comment.