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.0 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. if [ "$git_url" == "" ]
  16. then
  17. echo
  18. echoError "There is no git url configured"
  19. echo
  20. exit
  21. fi
  22. echo
  23. echoMainTitle "Cloning Repository"
  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
  41. if [ ! -d "$workspaces_dir/$customer/$project" ]
  42. then
  43. echo
  44. echoError "Wprkspace dir not exists"
  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