aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-lib
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-11-09 13:25:46 +0000
committermerakor <cem@ckyln.com>2020-11-09 13:25:46 +0000
commit981961fbfa71af661ac611a13a0707b407d07643 (patch)
tree4d165a0a46dc5736e88ecc865da40f6d83e09e96 /src/cpt-lib
parenta28f051f36c99ea919097d1dcc2daf7da23ed980 (diff)
parentc10e49d9caf08d0729024f5cf770634a739ebbe3 (diff)
downloadcpt-981961fbfa71af661ac611a13a0707b407d07643.tar.gz
Merge branch 'master' into full-pkg-pathfull-pkg-path
FossilOrigin-Name: 116d2928ca61b3db6ae9c2c7719838b488db938f6f1ca76b483d4ef9da7cf3d0
Diffstat (limited to 'src/cpt-lib')
-rw-r--r--src/cpt-lib13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/cpt-lib b/src/cpt-lib
index aba33ec..7b67f79 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -1788,9 +1788,18 @@ create_cache() {
}
-main() {
+# main()
+{
set -ef
+ # If a parser definition exists, let's run it ourselves. This makes sure we
+ # get the variables as soon as possible.
+ command -v parser_definition >/dev/null && {
+ eval "$(getoptions parser_definition parse "$0")"
+ parse "$@"
+ eval set -- "$REST"
+ }
+
# Create the cache directories for CPT and set the variables which point
# to them. This is seperate from temporary directories created in
# create_cache(). That's because we need these variables set on most
@@ -1881,5 +1890,3 @@ main() {
fi
}
-
-main "$@"