bugfix: ensure functions are loaded before internal cli calls

This commit is contained in:
2025-07-09 12:59:19 +02:00
parent 93cb0852ea
commit 7545a4229c

View File

@@ -2,21 +2,24 @@
set -eu set -eu
if [ ! "${SCRIPT_LOADED:-}" ]; then # Always load functions
# Helper functions # Helper functions
. "sh/helper.sh" . "sh/helper.sh"
# Read theme
. "sh/theme.sh"
# Read configuration
. "sh/config.sh"
# Load awk scripts
. "sh/awkscripts.sh"
# iCalendar routines # iCalendar routines
. "sh/icalendar.sh" . "sh/icalendar.sh"
# Attachment handling # Attachment handling
. "sh/attachment.sh" . "sh/attachment.sh"
# Categories handling # Categories handling
. "sh/categories.sh" . "sh/categories.sh"
# Load environment variables only when not yet loaded
if [ ! "${SCRIPT_LOADED:-}" ]; then
# Read configuration
. "sh/config.sh"
# Read theme
. "sh/theme.sh"
# Load awk scripts
. "sh/awkscripts.sh"
# Mark as loaded # Mark as loaded
export SCRIPT_LOADED=1 export SCRIPT_LOADED=1
fi fi