16 lines
293 B
Bash
Executable File
16 lines
293 B
Bash
Executable File
#!/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"
|
|
}
|
|
|