11 lines
283 B
Bash
11 lines
283 B
Bash
|
#!/bin/sh
|
||
|
git submodule status |
|
||
|
sed 's/^.//' |
|
||
|
while read -r i; do
|
||
|
commit="$(echo -n "$i" | cut -d\ -f1)"
|
||
|
path="$(echo -n "$i" | cut -d\ -f2)"
|
||
|
key="submodule.${path}.commit"
|
||
|
git config -f .gitmodules --unset-all "$key"
|
||
|
git config -f .gitmodules --add "$key" "$commit"
|
||
|
done
|