git_show_deps.sh
1 #!/usr/bin/env bash 2 3 set -e 4 5 if [[ -f .gitmodules ]]; then 6 git config --file .gitmodules --get-regexp 'path|url' | while read TMP S_PATH && read TMP S_URL; do 7 # we probably can't rely on that leading space always being there 8 S_HASH=$(git submodule status --cached "${S_PATH}" | sed 's/^\s*\(\S\+\).*$/\1/') 9 echo "${S_URL} ${S_HASH}" 10 done 11 fi 12