From 372f94d2bbd0c192ffc9141e0b3ac875bd1fd83e Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Sat, 26 Jun 2021 17:39:13 +0200 Subject: [PATCH] minor --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ae5f3c..74b6e8f 100644 --- a/README.md +++ b/README.md @@ -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 ```