catalyst-auto: set up a default GITDIR for scripts
Rather than hardcode system-specific paths, let catalyst-auto probe the current git dir based on its script name.
This commit is contained in:
parent
187e786116
commit
a05155c18b
3 changed files with 2 additions and 4 deletions
|
@ -123,6 +123,8 @@ if [ -z "${config_file}" -o ! -e "${config_file}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Probe the default gitdir from this script name.
|
||||
GITDIR=$(dirname "$(dirname "$(realpath "$0")")")
|
||||
source ${config_file}
|
||||
|
||||
TMPDIR=$(mktemp -d --tmpdir="${TMP_PATH:-/tmp}" catalyst-auto.XXXXXX)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue