nimbus-build-system/scripts/git_show_deps.sh

13 lines
350 B
Bash
Raw Normal View History

2020-07-16 19:02:06 +00:00
#!/bin/bash
set -e
if [[ -f .gitmodules ]]; then
git config --file .gitmodules --get-regexp 'path|url' | while read TMP S_PATH && read TMP S_URL; do
# we probably can't rely on that leading space always being there
S_HASH=$(git submodule status --cached "${S_PATH}" | sed 's/^\s*\(\S\+\).*$/\1/')
echo "${S_URL} ${S_HASH}"
done
fi