From 80c032fcebd951e378017356ece86ce392fe8c1f Mon Sep 17 00:00:00 2001 From: Admin9705 <9705@duck.com> Date: Wed, 25 Sep 2024 10:55:49 -0400 Subject: [PATCH] test --- mods/scripts/apps/interface.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mods/scripts/apps/interface.sh b/mods/scripts/apps/interface.sh index 472b64c43..8e5d7a690 100644 --- a/mods/scripts/apps/interface.sh +++ b/mods/scripts/apps/interface.sh @@ -61,11 +61,8 @@ execute_dynamic_menu() { source "/pg/apps/${app_name}.app" fi - # Get the selected option name (e.g., "Plex Token") - local selected_name=$(echo "${dynamic_menu_items[$((selected_option-1))]}" | awk '{$1=""; print $0}' | xargs) # Trim spaces and get full menu item name - - # Convert the selected_name to lowercase, replace spaces with underscores, and remove trailing underscores - local function_name=$(echo "$selected_name" | tr '[:upper:]' '[:lower:]' | tr ' ' '_' | sed 's/_$//') + # Construct the function name as menuN where N is the selected_option + local function_name="menu${selected_option}" # Check if the function exists and execute it if declare -f "$function_name" > /dev/null; then