2016-06-23 17:05:45 +00:00
|
|
|
#!/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
|
2016-06-27 20:17:53 +00:00
|
|
|
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
|
2016-06-23 17:05:45 +00:00
|
|
|
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
|
2016-06-24 15:02:17 +00:00
|
|
|
mv -v output.readme gitfile-info/README
|
2016-06-23 17:05:45 +00:00
|
|
|
echo "=+-Kopieren und Anpassen abgeschlossen---------------------------+=" >> build.log
|
|
|
|
cd gitfile-info
|
|
|
|
echo "=+-Packe DTX-----------------------------------------------------+=" >> build.log
|
2016-06-24 15:02:17 +00:00
|
|
|
../makedtx.pl -src "(.*)\.sty=>\1.sty" -doc ../dokumentation.tex \
|
2016-06-27 20:17:53 +00:00
|
|
|
-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" \
|
|
|
|
-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" \
|
2016-06-23 17:05:45 +00:00
|
|
|
-date "`date +%Y-%m-%d:%H:%M:%S` -- Version $1" \
|
2016-06-27 20:17:53 +00:00
|
|
|
-author "André Hilbig, mail@andrehilbig.de" -codetitle "Code" gitfile-info
|
2016-06-23 17:05:45 +00:00
|
|
|
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 ..
|
2016-06-24 15:02:17 +00:00
|
|
|
zip -r gitfile-info_latest.zip gitfile-info/gitfile-info.dtx gitfile-info/gitfile-info.ins
|