diff --git a/toolbox b/toolbox index 23742ba..aa61a48 100644 --- a/toolbox +++ b/toolbox @@ -25,9 +25,12 @@ declare -A SCRIPT_MAP for script in "${SCRIPTS[@]}"; do # Get base name, remove underscores, and capitalize first letter DISPLAY_NAME=$(basename "$script" | sed 's/_/ /g' | awk '{print toupper(substr($0,1,1)) tolower(substr($0,2))}') - - MENU_OPTIONS+=("$DISPLAY_NAME" "") - SCRIPT_MAP["$DISPLAY_NAME"]="$script" + + # Exclude scripts with "Toolbox" in the name + if [[ "$DISPLAY_NAME" != *"Toolbox"* ]]; then + MENU_OPTIONS+=("$DISPLAY_NAME" "") + SCRIPT_MAP["$DISPLAY_NAME"]="$script" + fi done # Show the menu using whiptail @@ -36,4 +39,8 @@ CHOICE=$(whiptail --title "Script Selector" --menu "Choose a script to run:" 15 # Check if the user made a selection if [[ -n "$CHOICE" ]]; then SCRIPT_PATH="${SCRIPT_MAP[$CHOICE]}" - whiptail --msgbox "Running: $CHOICE \ No newline at end of file + whiptail --msgbox "Running: $CHOICE" 10 40 + "$SCRIPT_PATH" +else + whiptail --msgbox "No script selected." 10 40 +fi