Advertisement
vonschutter

Untitled

Nov 11th, 2022
1,269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.15 KB | None | 0 0
  1. display_software_installation_choices_gtk ()
  2. {
  3. # Function to display the software install otions. All software option are listed in
  4. # the _rtd_recipes recipe book. Leveraging all the useful function in _rtd_library.
  5. # NOTE: adding a function in _rtd_recipes named "recipes_* ()" will automaticall populete
  6. # the menu displayed to the user.
  7. #
  8. # Globals: ${_BACKTITLE} ${zstatus}
  9. # Dependencies: _rtd_recipes
  10. # Arguments: None
  11. # Outputs: interactive screen
  12. # Returns: 0/1 last command executed.
  13. # Usage:  simply call the function by its name.
  14. # Arguments: none
  15. #
  16. #
  17. # End of documentation
  18.  
  19.     DisplayMenu=( zenity  --list  --timeout 120 --width=800 --height=600 --text "$_BACKTITLE" --checklist  --column "ON/OFF" --column "Select Software to add:" --separator " " )
  20.     SoftwareList=$(list_loaded_software_functions --nonum)
  21.     MenuOptions=($(for i in $SoftwareList ; do echo -e "${zstatus:=false} ${i}" ; done ))
  22.  
  23.     declare -A choices
  24.     choices=$("${DisplayMenu[@]}" "${MenuOptions[@]}" )
  25.  
  26.     for choice in ${choices}
  27.         do
  28.         # call each chosen software install (by function) & add recepie (removed for display purposes)
  29.         add_software_task recipe_${choice}
  30.     done
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement