btstack/tools/get_version.sh
matthias.ringwald@gmail.com 2c1e7bd82f bump version to 0.9
2015-01-15 15:21:54 +00:00

16 lines
617 B
Bash
Executable File

#!/bin/sh
DIR=`dirname $0`
FILE=$DIR/../include/btstack/version.h
REVISION=`svnversion | sed "s/\([0-9]*\).*/\1/"`
MAJOR=0
MINOR=9
DATE=`date "+%Y-%m-%d_%H:%M:%S"`
printf "// BTstack - version.h\n" > $FILE
printf "// - generated by %s\n" $0>> $FILE
printf "// - at %s\n" $DATE >> $FILE
printf "#define BTSTACK_MAJOR %u\n" $MAJOR >> $FILE
printf "#define BTSTACK_MINOR %u\n" $MINOR >> $FILE
printf "#define BTSTACK_REVISION %u\n" $REVISION >> $FILE
printf "#define BTSTACK_VERSION \"%u.%u-%u\"\n" $MAJOR $MINOR $REVISION >> $FILE
printf "#define BTSTACK_DATE \"%s\"" $DATE >> $FILE