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.

66 lines
1.2 KiB

  1. #!/bin/bash
  2. function usage {
  3. echo
  4. echoMainTitle "Clone repository"
  5. echo
  6. echoSubTitle "Usage:"
  7. echo
  8. echo "project-manager git:clone [project-shortname]"
  9. echo
  10. echo "--help Prints this message"
  11. echo
  12. }
  13. source "$project_manager_dir/bin/includes/project_header"
  14. gitValidate
  15. help="$(getParameter "--help" false "$@")"
  16. if [ "$help" == true ] || [ "$1" == "" ]
  17. then
  18. usage
  19. exit
  20. fi
  21. if [ "$git_url" == "" ]
  22. then
  23. echo
  24. echoError "There is no git url configured"
  25. echo
  26. exit
  27. fi
  28. echo
  29. echoMainTitle "Cloning Repository"
  30. echo
  31. echoSubTitle "Please confirm following data"
  32. echo
  33. if [ "$git_ssh_private_key" != "" ]
  34. then
  35. echo "SSH Private Key File: $git_ssh_public_key"
  36. fi
  37. if [ "$git_ssh_public_key" != "" ]
  38. then
  39. echo "SSH Public Key File: $git_ssh_public_key"
  40. fi
  41. echo "GIT Url: $git_url"
  42. echo "GIT User: $git_ssh_user"
  43. echo "GIT Domain: $git_ssh_domain"
  44. echo "Install Location: $workspaces_dir/$customer/$project"
  45. echo
  46. confirm
  47. if [ ! -d "$workspaces_dir/$customer/$project" ]
  48. then
  49. echo
  50. echoError "Wprkspace dir not exists"
  51. echo
  52. exit
  53. fi
  54. sshAddKey "git"
  55. git clone "$git_url" "$workspaces_dir/$customer/$project"
  56. echo
  57. echoSuccess "GIT cloned"
  58. echo