btstack/doc/manual/update_getting_started.sh
2021-05-28 15:35:09 +02:00

18 lines
385 B
Bash
Executable File

#!/usr/bin/env sh
# get commit and tag
tag=`git tag --points-at HEAD`
commit=`git rev-parse --short HEAD`
branch=`git branch | sed -n -e 's/^\* \(.*\)/\1/p'`
# use tag if available
if [ -z "$tag" ]
then
version="$branch-$commit"
else
version="Version $tag ($commit)"
fi
# create mkdocs.yml
sed -e "s|VERSION|$version|" btstack_gettingstarted.tex > $1/btstack_gettingstarted.tex