xref: /btstack/doc/manual/update_getting_started.sh (revision 78fab72ea47061cabc1101e9880ba35e76a12158)
1767003cdSMatthias Ringwald#!/usr/bin/env sh
2767003cdSMatthias Ringwald
3767003cdSMatthias Ringwald# get commit and tag
4767003cdSMatthias Ringwaldtag=`git tag --points-at HEAD`
5767003cdSMatthias Ringwaldcommit=`git rev-parse --short HEAD`
647f52328SMatthias Ringwaldbranch=`git branch | sed -n -e 's/^\* \(.*\)/\1/p'`
7767003cdSMatthias Ringwald
8767003cdSMatthias Ringwald# use tag if available
9767003cdSMatthias Ringwaldif [ -z "$tag" ]
10767003cdSMatthias Ringwaldthen
1147f52328SMatthias Ringwald  version="$branch-$commit"
12767003cdSMatthias Ringwaldelse
136047cb1eSMatthias Ringwald  version="Version $tag ($commit)"
14767003cdSMatthias Ringwaldfi
15767003cdSMatthias Ringwald
16767003cdSMatthias Ringwald# create mkdocs.yml
17*78fab72eSMilanka Ringwaldsed -e "s|VERSION|$version|" btstack_gettingstarted.tex > $1/btstack_gettingstarted.tex
18