From 6be413dd64c359f03b91321defceef9d641f1235 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 15 Dec 2009 22:42:19 +0000 Subject: [PATCH] Some command lines don't like numbers with leading zeros. Remove them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91463 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/buildit/build_llvm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index 4392b27ee1b..25f65544c69 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -243,7 +243,11 @@ if ! test $? == 0 ; then fi # Install Version.h -RC_ProjectSourceSubversion=`printf "%d" $LLVM_SUBMIT_SUBVERSION` +LLVM_MINOR_VERSION=`echo $LLVM_SUBMIT_SUBVERSION | sed -e 's,0*\([1-9][0-9]*\),\1,'` +if [ "x$LLVM_MINOR_VERSION" = "x" ]; then + LLVM_MINOR_VERSION=0 +fi +RC_ProjectSourceSubversion=`printf "%d" $LLVM_MINOR_VERSION` echo "#define LLVM_VERSION ${RC_ProjectSourceVersion}" > $DEST_DIR$DEST_ROOT/include/llvm/Version.h echo "#define LLVM_MINOR_VERSION ${RC_ProjectSourceSubversion}" >> $DEST_DIR$DEST_ROOT/include/llvm/Version.h