Update _init. Add configuration option.

This commit is contained in:
femsci 2022-11-05 01:06:12 +01:00
parent 1ed7791527
commit 68c2515b5a
Signed by: femsci
GPG key ID: 08F7911F0E650C67
2 changed files with 18 additions and 0 deletions

9
config.d/CONFIGURATION Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
#
# You can set various options as environment variables here.
# For instance:
# PINCH_CFG='test'
# will create a variable PINCH_CFG with test as the content.
#

View file

@ -38,6 +38,15 @@ export -f err_trap
trap err_trap ERR
pdebug "Retrieving configuration..."
set -a
for cff in $(ls $HOOK_PATH/../config.d/)
do
pdebug "Sourcing $cff"
source $HOOK_PATH/../config.d/$cff
done
set +a
exec_custom() {
local hooks_path=$HOOK_PATH/../custom.d/$1