#!/bin/bash echo "===================================================================" >> build.log rm -v gitfile-info/gitfile-info.bib echo "=+-Lauf vom `date +%Y-%m-%d:%H:%M:%S`----------------------------------+=" >> build.log sty2dtx -O -c gitfile-info.sty -o gitfile-info/gitfile-info.sty >> build.log echo "=+-sty2dtx abgeschlossen-----------------------------------------+=" >> build.log cp -v gfi-run.py gitfile-info/ cp -v post-commit.py gitfile-info/ cp -v post-merge.py gitfile-info/ cp -v dokumentation.gfi gitfile-info/gitfile-info.gfi sed "s/Version: [0-9].[0-9]*/Version: $1/1" README > /tmp/output.readme sed "s/Last Change: [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/Last Change: `date +%Y-%m-%d`/1" /tmp/output.readme > output.readme mv -v output.readme gitfile-info/README echo "=+-Kopieren und Anpassen abgeschlossen---------------------------+=" >> build.log cd gitfile-info echo "=+-Packe DTX-----------------------------------------------------+=" >> build.log ../makedtx.pl -src "(.*)\.sty=>\1.sty" -doc ../dokumentation.tex \ -src "gfi-run.py=>gfi-run.py" -src "post-commit.py=>post-commit.py" -src "post-merge.py=>post-merge.py" \ -macrocode "gfi-run.py" -macrocode "post-commit.py" -macrocode "post-merge.py" \ -macrocode "gitfile-info.gfi" -setambles "gitfile-info.gfi=>\\nopreamble\\nopostamble"\ -src "gitfile-info.gfi=>gitfile-info.gfi" -comment "gitfile-info.gfi" \ -setambles "gfi-run.py=>\\nopreamble\\nopostamble" -setambles "post-commit.py=>\\nopreamble\\nopostamble" \ -setambles "post-merge.py=>\\nopreamble\\nopostamble" \ -comment "gfi-run.py" -comment "post-commit.py" -comment "post-merge.py" \ -date "`date +%Y-%m-%d:%H:%M:%S` -- Version $1" \ -author "André Hilbig, mail@andrehilbig.de" -codetitle "Code" gitfile-info pdflatex gitfile-info.dtx CHECKSUM=$(grep "The checksum should be" gitfile-info.log | grep -o "[0-9]*") echo "The checksum is: $CHECKSUM" sed -e s/CheckSum\{[0-9]*\}/CheckSum\{$CHECKSUM\}/1 gitfile-info.dtx > output.dtx rm gitfile-info.dtx mv output.dtx gitfile-info.dtx latexmk -pdf gitfile-info.dtx cd .. zip -r gitfile-info_latest.zip gitfile-info/gitfile-info.dtx gitfile-info/gitfile-info.ins