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.

59 lines
1.1 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. echo
  16. echoMainTitle "Cloning Repository"
  17. if [ "$git_url" == "" ]
  18. then
  19. echo
  20. echoError "There is no git url configured"
  21. echo
  22. exit
  23. fi
  24. echo
  25. echoSubTitle "Please confirm following data"
  26. echo
  27. if [ "$git_ssh_private_key" != "" ]
  28. then
  29. echo "SSH Private Key File: $git_ssh_public_key"
  30. fi
  31. if [ "$git_ssh_public_key" != "" ]
  32. then
  33. echo "SSH Public Key File: $git_ssh_public_key"
  34. fi
  35. echo "GIT Url: $git_url"
  36. echo "GIT User: $git_ssh_user"
  37. echo "GIT Domain: $git_ssh_domain"
  38. echo "Install Location: $workspaces_dir/$customer/$project"
  39. echo
  40. confirm="$(readConsole "Should i execute [y,n]:" "Invalid selection" "y n")"
  41. if [ "$confirm" == "n" ]
  42. then
  43. echo
  44. echoError "Aborting"
  45. echo
  46. exit;
  47. fi
  48. sshAddKey "git"
  49. git clone "$git_url" "$workspaces_dir/$customer/$project"
  50. echo
  51. echoSuccess "GIT cloned"
  52. echo