gitfile-info/build

32 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
echo "===================================================================" >> build.log
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 gitfile-info/
cp -v post-commit gitfile-info/
cp -v post-merge gitfile-info/
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=>gfi-run" -src "post-commit=>post-commit" -src "post-merge=>post-merge" \
-macrocode "gfi-run" -macrocode "post-commit" -macrocode "post-merge" \
-setambles "gfi-run=>\\nopreamble\\nopostamble" -setambles "post-commit=>\\nopreamble\\nopostamble" \
-setambles "post-merge=>\\nopreamble\\nopostamble" \
-comment "gfi-run" -comment "post-commit" -comment "post-merge" \
-date "`date +%Y-%m-%d:%H:%M:%S` -- Version $1" \
-author "André Hilbig, mail@andrehilbig.de" -codetitle "Implementation" 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