Skip to content

Commit caf5fbe

Browse files
committed
git-gui: make output of GIT-VERSION-GEN source'able
The output of GIT-VERSION-GEN can be sourced by our Makefile to make the version available there. The output has a couple of spaces around the equals sign, which is perfectly valid for parsing it in our Makefile. But in subsequent steps we'll also want to source the file in a couple of newly-introduced shell scripts, but having spaces around variable assignments is invalid there. Prepare for this step by dropping the spaces surrounding the equals sign. Like this, we can easily use the same file both in our Makefile and in shell scripts. Signed-off-by: Patrick Steinhardt <[email protected]>
1 parent 3ef470f commit caf5fbe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

GIT-VERSION-GEN

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ esac
8484

8585
if test -r "$OUTPUT"
8686
then
87-
VC=$(sed -e 's/^GITGUI_VERSION = //' <"$OUTPUT")
87+
VC=$(sed -e 's/^GITGUI_VERSION=//' <"$OUTPUT")
8888
else
8989
VC=unset
9090
fi
9191
test "$VN" = "$VC" || {
92-
echo >&2 "GITGUI_VERSION = $VN"
93-
echo "GITGUI_VERSION = $VN" >"$OUTPUT"
92+
echo >&2 "GITGUI_VERSION=$VN"
93+
echo "GITGUI_VERSION=$VN" >"$OUTPUT"
9494
}

0 commit comments

Comments
 (0)