Update _init. Add configuration option.
This commit is contained in:
parent
1ed7791527
commit
68c2515b5a
2 changed files with 18 additions and 0 deletions
9
config.d/CONFIGURATION
Normal file
9
config.d/CONFIGURATION
Normal 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.
|
||||
#
|
||||
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue