Guest User

Untitled

a guest
Jan 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. cd ../
  2. if [ ! -d "gitcode" ];
  3. then
  4. mkdir gitcode
  5. fi
  6. cd gitcode
  7.  
  8. if [ ! -d "todev.web" ];
  9. then
  10. echo "checkout git code start..."
  11. mkdir todev.web
  12. cd todev.web
  13. git init
  14. git remote add origin git@github.com:itwangxiang/todev.web.git
  15. git pull origin master
  16. echo "checkout git code done."
  17. else
  18. echo "update git code start..."
  19. cd todev.web
  20. git pull origin master
  21. echo "update git code done."
  22. fi
  23.  
  24. if [ ! -d "/mnt/www.todev.cn/wwwroot" ];
  25. then
  26. mkdir -p /mnt/www.todev.cn/wwwroot
  27. fi
  28.  
  29. rm -rf src/Config.js docs
  30. cp -R * /mnt/www.todev.cn/wwwroot
  31. echo "deploy code done"
  32.  
  33. cd /mnt/www.todev.cn/wwwroot
  34. npm install
  35. echo "npm install done"
  36. /mnt/www.todev.cn/wwwroot/restart.sh
  37. echo "restart todev.web done"
Add Comment
Please, Sign In to add comment