restructured repository based on following standards:

https://github.com/HW-Core/directory-structure
This commit is contained in:
Yehonal
2016-07-08 23:58:11 +02:00
parent eda1171939
commit 9fd22872c0
2536 changed files with 433 additions and 2158 deletions

View File

@@ -0,0 +1,16 @@
# par 1: hook_name
function runHooks() {
hook_name="HOOKS_MAP_$1"
read -r -a SRCS <<< ${!hook_name}
echo "Running hooks: $hook_name"
for i in "${SRCS[@]}"
do
$i # run registered hook
done
}
function registerHooks() {
hook_name="HOOKS_MAP_$1"
hooks=${@:2}
declare -g "$hook_name+=$hooks "
}