Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- submodule () {
- parent=$(git rev-parse --show-superproject-working-tree)
- echo $parent
- }
- push () {
- if [[ $1 ]]
- then
- git add .
- git commit -a -m "$1"
- fi
- git push
- issubmodule=$(submodule)
- if [[ $issubmodule ]]
- then
- echo "Updating submodules on parent repository"
- if [[ $1 ]]
- then
- (cd $issubmodule && \
- git add . && \
- git commit -m "Update theme submodue: $1" && \
- git push)
- else
- (cd $issubmodule && git push)
- fi
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement