16 lines
293 B
Plaintext
16 lines
293 B
Plaintext
|
#!/bin/zsh
|
||
|
|
||
|
git submodule update --remote --rebase --init
|
||
|
|
||
|
SUBMODULES=$(\
|
||
|
git status\
|
||
|
| grep '(new commits)' \
|
||
|
| sed 's/^.*modified:\s*//; s/\s*(new commits).*$//' \
|
||
|
)
|
||
|
|
||
|
[[ ${#SUBMODULES[@]} -gt 0 ]] && {
|
||
|
git add $SUBMODULES
|
||
|
git commit -m "Updated submodules to master : $SUBMODULES"
|
||
|
}
|
||
|
|