diff --git a/.gitignore b/.gitignore index e69de29..3b80775 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +hooks.d/* diff --git a/lib/initiate.bash b/lib/initiate.bash index 9b89f39..165d96a 100644 --- a/lib/initiate.bash +++ b/lib/initiate.bash @@ -134,7 +134,7 @@ function link_config_files { function force_reload { bind -f /etc/inputrc 2>/dev/null # arch: dismiss harmless warning - source /etc/profile + # source /etc/profile } function in_azerty_zone { @@ -210,9 +210,20 @@ function create_sudoers { fi } +function launch_hooks { + find "$MIAOU_BASH_DIR"/hooks.d -maxdepth 1 -name "after-upgrade*" -type f -executable | + sort | + while read -r hook; do + echo "Processing: $hook" + + # shellcheck disable=SC1090 + source "$hook" + done +} + # MAIN -source "$MIAOU_BASH_DIR/lib/functions.bash" +source "$MIAOU_BASH_DIR"/lib/functions.bash assert_root DISTRO_LIKE=$(fetch_distro_like) @@ -223,4 +234,5 @@ ghostty_global_config link_config_files link_miaou_bash create_sudoers -force_reload +launch_hooks +# force_reload