{"thread":{"id":"3227","subject":"[PATCH] do not cat version file if it does not exist","startedAt":"2006-02-03T10:11:52Z","lastAt":"2006-02-03T10:11:52Z","messageCount":1,"participants":["Amos Waterland"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15518","messageId":"20060203101152.GA11233@kvasir.watson.ibm.com","threadId":"3227","inReplyTo":null,"subject":"[PATCH] do not cat version file if it does not exist","fromName":"Amos Waterland","fromEmail":"apw@us.ibm.com","sentAt":"2006-02-03T10:11:52Z","receivedAt":"2006-02-03T10:11:52Z","isPatch":true,"sender":{"key":"apw@debian.org","avatar":null},"body":"The build process currently produces this ugly message:\n\n $ make\n cat: version: No such file or directory\n GIT_VERSION = 1.1.GIT\n cat: version: No such file or directory\n\nThis patch make GIT-VERSION-GEN check that a file named `version' exists\nbefore trying to cat it.\n\nSigned-off-by: Amos Waterland <apw@us.ibm.com>\n\n---\n\n GIT-VERSION-GEN |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\napplies-to: 2b022b9b34b375afff456e7527a3d89a56ce8abf\neff0a8f6c905b3112538f30fb5a9ce09d4e18e72\ndiff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN\nindex 72201be..fbaa397 100755\n--- a/GIT-VERSION-GEN\n+++ b/GIT-VERSION-GEN\n@@ -7,8 +7,10 @@ DEF_VER=v1.1.GIT\n # (included in release tarballs), then default\n if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then\n \tVN=$(echo \"$VN\" | sed -e 's/-/./g');\n+elif test -f version; then\n+\tVN=$(cat version);\n else\n-\tVN=$(cat version) || VN=\"$DEF_VER\"\n+\tVN=\"$DEF_VER\";\n fi\n \n VN=$(expr \"$VN\" : v*'\\(.*\\)')\n---\n0.99.9.GIT\n"}]}