This commit is contained in:
Daniel Langbein 2021-06-26 17:39:13 +02:00
parent 0562f6c627
commit 372f94d2bb

View File

@ -24,10 +24,12 @@ git submodule init
To update all submodules and print a list of those who received an update, run
```shell
if stdout="$(git submodule update --remote)"; then
if output="$(git submodule update --remote 2>&1)"; then
# We capture only the part after "pkg" until the next "'" using sed
# Source: https://unix.stackexchange.com/a/165590/315162
sed 's|^Submodule path '\''pkg/\([^'\'']*\).*|\1|' <<< "$stdout"
sed 's|^Submodule path '\''pkg/\([^'\'']*\).*|\1|' <<< "$output"
else
echo "$output"
fi
```