looper/update-commits.sh

11 lines
283 B
Bash
Raw Normal View History

2024-09-28 10:31:06 -07:00
#!/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