diff options
Diffstat (limited to 'src/cpt-lib')
-rw-r--r-- | src/cpt-lib | 13 |
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 "$@" |