container: finance: add dependency checks for modules

Since modules are included upon build type, if a build doesn't support
a feature then that feature's dependencies will not be available.

This commit will give notice of those missing dependencies.
This commit is contained in:
2024-09-16 21:51:59 -07:00
parent 6d0a38f6b5
commit 0b2c76a813
6 changed files with 19 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ function lib_finance::finance()
fi
declare -grx global_child_profile_journal="${global_child_profile_flow}/all-years.journal"
declare -grx global_hledger_cmd=("/usr/bin/hledger" "-f" "$global_child_profile_journal")
declare -grx global_hledger_cmd=("hledger" "-f" "$global_child_profile_journal")
# Globals (configuration)
declare -grx global_conf_fetch="${global_child_profile_flow}/docker-finance.d/fetch/fetch.yaml"
@@ -215,6 +215,8 @@ function lib_finance::reports()
function lib_finance::root()
{
# TODO: lib_root, add extendable arguments
lib_utils::deps_check "root"
# NOTE: will automatically load rootlogon.C
pushd "${DOCKER_FINANCE_CONTAINER_REPO}/src/root/macro" 1>/dev/null \
&& root -l