From 323e5d9fc83f0d87ebabd6c3e48b1c57cca32c49 Mon Sep 17 00:00:00 2001 From: ge Date: Sun, 15 May 2022 08:34:48 +0300 Subject: [PATCH] feat: Add config loading --- src/bafscript | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bafscript b/src/bafscript index c4a2434..65fecde 100755 --- a/src/bafscript +++ b/src/bafscript @@ -124,8 +124,10 @@ log "Scripts to process (${_count}): ${__args[@]}" for script in "${__args[@]}"; do + # Source scripts source_script "$script" - #. "$__config" # TODO Make it safe! + # Config can ovewrite script functions and variables + [ -n "$__config" ] && . "$__config" echo echo -e "\e[1m==> Script: ${__args[_iter-1]##*/} [$_iter/$_count]\e[0m" | log -p