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
This commit is contained in:
Bill Wendling 2009-12-15 22:42:19 +00:00
parent 970eaf2520
commit 6be413dd64

View File

@ -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