mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-20 19:57:46 +02: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
|
# Repository: https://github.com/eth-p/bat-extras
|
||||||
# Issues: https://github.com/eth-p/bat-extras/issues
|
# Issues: https://github.com/eth-p/bat-extras/issues
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
if [[ -z "$__LIB_CONSTANTS_INITIALIZED" ]]; then
|
||||||
|
__LIB_CONSTANTS_INITIALIZED=true
|
||||||
|
|
||||||
|
# Constants
|
||||||
EXECUTABLE_BAT="bat"
|
EXECUTABLE_BAT="bat"
|
||||||
EXECUTABLE_GIT="git"
|
EXECUTABLE_GIT="git"
|
||||||
EXECUTABLE_DELTA="delta"
|
EXECUTABLE_DELTA="delta"
|
||||||
@ -18,3 +22,5 @@ PROGRAM_VERSION="$({
|
|||||||
printf "%s-git (%s)" "" "$(git -C "${TOP}" rev-parse --short HEAD)"
|
printf "%s-git (%s)" "" "$(git -C "${TOP}" rev-parse --short HEAD)"
|
||||||
fi
|
fi
|
||||||
})"
|
})"
|
||||||
|
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user