Ensure run.local files are located relative to the

...run file

Prevent erroring if `run` is being executed within a sub-directory, like
`assets`.
This commit is contained in:
Oliver Davies 2024-07-31 01:20:30 +01:00
parent ac8246704e
commit 4e255cd667
8 changed files with 19 additions and 11 deletions

View file

@ -25,7 +25,8 @@ function help {
}
# Include any local tasks.
[[ -e run.local ]] && source run.local
# https://stackoverflow.com/a/6659698
[[ -e "${BASH_SOURCE%/*}/run.local" ]] && source "${BASH_SOURCE%/*}/run.local"
TIMEFORMAT=$'\nTask completed in %3lR'
time "${@:-help}"