#!/bin/ash -efu git submodule init git submodule status | cut -d' ' -f2 | while read path; do url="$(git config --get "submodule.$path.url")" git fetch "$url" "master:submodule/$path" done