Skip to content

Commit

Permalink
Parse the BALL version from CMakeLists.txt
Browse files Browse the repository at this point in the history
This change allows us to make BALL.doc a template for cmake
  • Loading branch information
dstoeckel committed Feb 24, 2011
1 parent 9ee017d commit 48b4c88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autobuild
Expand Up @@ -70,8 +70,12 @@ askContrib()
exit 11
fi
else if [ "$INST" = "No" ]; then
export VERSION=`cat "include/BALL/BALL.doc" | grep version | sed "s/.version//" | tr -d ' ' | tr -d '\t'`
echo Assuming version is:$VERSION ....
MAJOR_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_MAJOR "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
MINOR_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_MINOR "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
PATCH_VERSION=`grep ^SET\(BALL_PACKAGE_VERSION_PATCH "CMakeLists.txt" | sed 's/.*\"\([0-9]*\)\".*/\1/'`
export VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"

echo Assuming version is: $VERSION ....
if [ "$OS" != Darwin ]
then
PACKAGE=${PREFIX}"-"${VERSION}".tar.gz"
Expand Down

0 comments on commit 48b4c88

Please sign in to comment.