btstack/doc/manual/update_getting_started.sh

18 lines
385 B
Bash
Raw Normal View History

2021-05-25 06:53:22 +00:00
#!/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'`
2021-05-25 06:53:22 +00:00
# use tag if available
if [ -z "$tag" ]
then
version="$branch-$commit"
2021-05-25 06:53:22 +00:00
else
version="Version $tag ($commit)"
2021-05-25 06:53:22 +00:00
fi
# create mkdocs.yml
2021-05-28 13:35:09 +00:00
sed -e "s|VERSION|$version|" btstack_gettingstarted.tex > $1/btstack_gettingstarted.tex