mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-13 17:50:56 +01:00
lib: Add include guard to constants.sh to lower startup time
This commit is contained in:
parent
8524f873fb
commit
a31b322272
@ -5,6 +5,10 @@
|
||||
# Repository: https://github.com/eth-p/bat-extras
|
||||
# Issues: https://github.com/eth-p/bat-extras/issues
|
||||
# -----------------------------------------------------------------------------
|
||||
if [[ -z "$__LIB_CONSTANTS_INITIALIZED" ]]; then
|
||||
__LIB_CONSTANTS_INITIALIZED=true
|
||||
|
||||
# Constants
|
||||
EXECUTABLE_BAT="bat"
|
||||
EXECUTABLE_GIT="git"
|
||||
EXECUTABLE_DELTA="delta"
|
||||
@ -18,3 +22,5 @@ PROGRAM_VERSION="$({
|
||||
printf "%s-git (%s)" "" "$(git -C "${TOP}" rev-parse --short HEAD)"
|
||||
fi
|
||||
})"
|
||||
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user