Ein für Shopware 6 vorbereitet Systemmanagment.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
920 B

  1. #!/bin/bash
  2. ### DO NOT EDIT THIS FILE
  3. source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd)/etc/config"
  4. source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd)/etc/projects"
  5. function usage {
  6. echo
  7. echoMainTitle "List all projects"
  8. echo
  9. echoSubTitle "Usage:"
  10. echo
  11. echo "list-projects"
  12. echo
  13. echo "--help Prints this message"
  14. echo
  15. }
  16. function listProjects {
  17. echo >&2
  18. echoSubTitle "Projects list" >&2
  19. echo >&2
  20. for i in "${!projects[@]}"
  21. do
  22. echo "- Shortname: ${shortnames[$i]}
  23. Customer: ${customers[$i]}
  24. Project: ${projects[$i]}" >&2
  25. echo
  26. done
  27. }
  28. echo
  29. echoMainTitle "Listing projects"
  30. help="$(getParameter "--help" false "$*")"
  31. if [ "$help" == true ]
  32. then
  33. usage
  34. exit
  35. fi
  36. if [ "${#projects[@]}" -eq 0 ]
  37. then
  38. echo
  39. echo "There are currently no projects setted up"
  40. echo
  41. else
  42. listProjects
  43. fi
  44. echoSuccess "Listing done"