Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin9705 committed Sep 25, 2024
1 parent 97f6e09 commit 80c032f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mods/scripts/apps/interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80c032f

Please sign in to comment.