From: Amos Waterland <apw@us.ibm.com>
To: junkio@cox.net
Cc: git@vger.kernel.org
Subject: [PATCH] do not cat version file if it does not exist
Date: Fri, 3 Feb 2006 05:11:52 -0500 [thread overview]
Message-ID: <20060203101152.GA11233@kvasir.watson.ibm.com> (raw)
The build process currently produces this ugly message:
$ make
cat: version: No such file or directory
GIT_VERSION = 1.1.GIT
cat: version: No such file or directory
This patch make GIT-VERSION-GEN check that a file named `version' exists
before trying to cat it.
Signed-off-by: Amos Waterland <apw@us.ibm.com>
---
GIT-VERSION-GEN | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
applies-to: 2b022b9b34b375afff456e7527a3d89a56ce8abf
eff0a8f6c905b3112538f30fb5a9ce09d4e18e72
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 72201be..fbaa397 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -7,8 +7,10 @@ DEF_VER=v1.1.GIT
# (included in release tarballs), then default
if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then
VN=$(echo "$VN" | sed -e 's/-/./g');
+elif test -f version; then
+ VN=$(cat version);
else
- VN=$(cat version) || VN="$DEF_VER"
+ VN="$DEF_VER";
fi
VN=$(expr "$VN" : v*'\(.*\)')
---
0.99.9.GIT
reply other threads:[~2006-02-03 10:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060203101152.GA11233@kvasir.watson.ibm.com \
--to=apw@us.ibm.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).