Actualiser toolbox
This commit is contained in:
parent
878e03d1c6
commit
db16544a2d
1 changed files with 3 additions and 3 deletions
6
toolbox
6
toolbox
|
@ -23,8 +23,8 @@ MENU_OPTIONS=()
|
||||||
declare -A SCRIPT_MAP
|
declare -A SCRIPT_MAP
|
||||||
|
|
||||||
for script in "${SCRIPTS[@]}"; do
|
for script in "${SCRIPTS[@]}"; do
|
||||||
# Get base name, remove underscores, and capitalize first letter
|
# Get base name, remove underscores, and capitalize first letter of each word
|
||||||
DISPLAY_NAME=$(basename "$script" | sed 's/_/ /g' | awk '{print toupper(substr($0,1,1)) tolower(substr($0,2))}')
|
DISPLAY_NAME=$(basename "$script" | sed 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2)); print}')
|
||||||
|
|
||||||
# Exclude scripts with "Toolbox" in the name
|
# Exclude scripts with "Toolbox" in the name
|
||||||
if [[ "$DISPLAY_NAME" != *"Toolbox"* ]]; then
|
if [[ "$DISPLAY_NAME" != *"Toolbox"* ]]; then
|
||||||
|
@ -34,7 +34,7 @@ for script in "${SCRIPTS[@]}"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Show the menu using whiptail with the new title
|
# Show the menu using whiptail with the new title
|
||||||
CHOICE=$(whiptail --title "TyOS Setup Toolbox" --menu "Choose a script to run:" 15 50 5 "${MENU_OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
CHOICE=$(whiptail --title "TyOS Setup Toolbox" --menu "Choose A Script To Run:" 15 50 5 "${MENU_OPTIONS[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
# Check if the user made a selection
|
# Check if the user made a selection
|
||||||
if [[ -n "$CHOICE" ]]; then
|
if [[ -n "$CHOICE" ]]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue