diff options
Diffstat (limited to 'make-setup-generated.sh')
-rwxr-xr-x | make-setup-generated.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/make-setup-generated.sh b/make-setup-generated.sh new file mode 100755 index 0000000..eedc745 --- /dev/null +++ b/make-setup-generated.sh @@ -0,0 +1,44 @@ +#! /bin/sh + +case "$1" in + *-wd*) + STAGE=wd + STAGENAME="Working Draft" + WORKINGDRAFT=`basename "$1" | sed 's/.*-wd//'` + ;; + *-os*) + STAGE=os + STAGENAME="OASIS Standard" + WORKINGDRAFT="" + ;; + *-csd*) + STAGE=csd + STAGENAME="Committee Specification Draft" + WORKINGDRAFT=`basename "$1" | sed 's/.*-csd//'` + ;; + *-csprd*) + STAGE=csprd + STAGENAME="Committee Specification Public Review Draft" + WORKINGDRAFT=`basename "$1" | sed 's/.*-csprd//'` + ;; + *-cs*) + STAGE=cs + STAGENAME="Committee Specification" + WORKINGDRAFT="" + ;; + *) + echo Unknown doc type >&2 + exit 1 +esac + +VERSION=1.0 +ISODATE=`git show --format=format:'%cd' --date=iso | head -n 1` +DATESTR=`date -d "$DATE" +'%d %b %Y'` +cat > setup-generated.tex <<EOF +% define VIRTIO Working Draft number and date +\newcommand{\virtiorev}{$VERSION} +\newcommand{\virtioworkingdraftdate}{$DATESTR} +\newcommand{\virtioworkingdraft}{$WORKINGDRAFT} +\newcommand{\virtiodraftstage}{$STAGE} +\newcommand{\virtiodraftstagename}{$STAGENAME} +EOF |