From: Felipe Contreras Date: Fri, 14 Apr 2023 12:18:40 GMT Subject: [PATCH 17/18] version-gen: get rid of GVF variable Message-ID: <20230414121841.373980-18-felipe.contreras@gmail.com> In-Reply-To: <20230414121841.373980-1-felipe.contreras@gmail.com> There's not much point in a variable which is never going to change and doesn't really add any readability. Signed-off-by: Felipe Contreras --- GIT-VERSION-GEN | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 8f2250bb1b..161fcdf1ab 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,5 @@ #!/bin/sh -GVF=GIT-VERSION-FILE - get_version () { test -f version && cat version && return git describe --match "v[0-9]*" --dirty 2>/dev/null | sed -e 's/-/./g' -e 's/^v//' @@ -9,5 +7,5 @@ get_version () { NEW="GIT_VERSION = $(get_version)" -test -r $GVF && test "$NEW" = "$(cat $GVF)" && exit -echo "$NEW" | tee $GVF >&2 +test -r GIT-VERSION-FILE && test "$NEW" = "$(cat GIT-VERSION-FILE)" && exit +echo "$NEW" | tee GIT-VERSION-FILE >&2 -- 2.40.0+fc1