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.

44 lines
1.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. #!/bin/bash
  2. ### DO NOT EDIT THIS FILE
  3. source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd)/includes/bash_header"
  4. function usage {
  5. echo
  6. echoMainTitle "Installs a plugin"
  7. echo
  8. echoSubTitle "Usage:"
  9. echo
  10. echo "install-plugin [shortname] [plugin]"
  11. echo
  12. echo "--help Prints this message"
  13. echo " "
  14. }
  15. shortname=$(getArgument "$1" "$(usage)" true)
  16. plugin=$(getArgument "$2" "$(usage)" true)
  17. customer=$(getCustomerFromShortname "$shortname")
  18. project=$(getProjectFromShortname "$shortname")
  19. project_dir="$project_manager_dir/data/$customer/$project"
  20. plugin_dir="$project_manager_dir/plugins/$plugin"
  21. echo
  22. echoMainTitle "Install plugin"
  23. if [ ! -d "$project_dir/etc/plugins/$plugin" ]
  24. then
  25. mkdir "$project_dir/etc/plugins/$plugin"
  26. fi
  27. etc_files=$(list "$plugin/etc")
  28. for etc_file in "${etc_files[@]}"
  29. do
  30. cp "$etc_file" "$project_dir/etc/plugins/$plugin/."
  31. done
  32. postScript "$project_manager_dir/bin/postscripts/commands/install-plugin"
  33. postScript "$project_dir/bin/postscripts/commands/install-plugin"
  34. echo
  35. echoSuccess "Plugin has been installed, please configure: $project_dir/etc/plugins/$plugin"
  36. echo