Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. submodule () {
  2. parent=$(git rev-parse --show-superproject-working-tree)
  3.  
  4. echo $parent
  5. }
  6.  
  7. push () {
  8. if [[ $1 ]]
  9. then
  10. git add .
  11. git commit -a -m "$1"
  12. fi
  13.  
  14. git push
  15.  
  16. issubmodule=$(submodule)
  17.  
  18. if [[ $issubmodule ]]
  19. then
  20. echo "Updating submodules on parent repository"
  21.  
  22. if [[ $1 ]]
  23. then
  24. (cd $issubmodule && \
  25. git add . && \
  26. git commit -m "Update theme submodue: $1" && \
  27. git push)
  28. else
  29. (cd $issubmodule && git push)
  30. fi
  31. fi
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement