Advertisement
Guest User

Untitled

a guest
Nov 9th, 2015
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ##
  4. # Delivery Agent Sandbox Provisioning Script
  5. #
  6. # Chris Childress <cchildress@deliveryagent.com>
  7. #
  8. # Assumptions :
  9. #
  10. # 1. git 1.8+
  11.  
  12.  
  13. # Set to 1 to use SSH over HTTPs when cloning
  14. USE_SSH=0
  15. # The name of the ecom repository directory
  16. ECOM_REPO="ecom"
  17. # The name of the webdev repository directory
  18. WEBDEV_REPO="webdev"
  19. # The engine directory
  20. ENGINE_DIR="engine"
  21. # The store directory
  22. STORE_DIR="da.store"
  23.  
  24. ##
  25. # Set up the home directory
  26. cd ~
  27. mkdir www
  28. cd www
  29.  
  30. ##
  31. # Clone the repository
  32. if [ "$USE_SSH" = 1 ]
  33. then
  34. echo "Cloning with SSH"
  35. git clone ssh://git@sf-stash.deliveryagent.com:7999/code/ecom.git $ECOM_REPO
  36. git clone ssh://git@sf-stash.deliveryagent.com:7999/code/webdev.git $WEBDEV_REPO
  37. else
  38. echo "Cloning with HTTPs"
  39. git clone https://$USER@sf-stash.deliveryagent.com/scm/code/ecom.git $ECOM_REPO
  40. git clone https://$USER@sf-stash.deliveryagent.com/scm/code/webdev.git $WEBDEV_REPO
  41. fi
  42.  
  43. ##
  44. # Sym links
  45. ln -s $ECOM_REPO/engine $ENGINE_DIR
  46. ln -s $WEBDEV_REPO $STORE_DIR
  47.  
  48. ##
  49. # Checkout develop
  50. cd $ENGINE_DIR
  51. git checkout develop
  52. git pull
  53. cd ../$STORE_DIR
  54. git checkout develop
  55. git pull
  56.  
  57. echo "..fin"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement