From 71847b3856592b810e30d6180dcd96f08a17de41 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 13 Jul 2022 22:12:39 +0300 Subject: [PATCH] tweaking.... Signed-off-by: Alex A. Naanou --- bashctrl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bashctrl b/bashctrl index c73f763..24e47fc 100755 --- a/bashctrl +++ b/bashctrl @@ -49,7 +49,12 @@ DISABLED_PLUGINS=( #---------------------------------------------------------------------- # helpers... -SCRIPT=`basename $0` +# when sourcing a script $0 is set to '-bash'... +if [ "$0" = "-bash" ] ; then + SCRIPT=bashctrl +else + SCRIPT=`basename $0` +fi function printhelp(){ cat << EOF Bash control script @@ -254,7 +259,9 @@ while true; do for plugin in ${BASH_DIR}/events/$2/* ; do [ $plugin == "README" ] \ && continue + echo " --- $plugin: pre" source $plugin $2 + echo " --- $plugin: post" done shift break