33 lines
1.9 KiB
Bash
Executable File
33 lines
1.9 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 bewerbung/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=>gfi-run" --macrocode "post-commit=>post-commit" --macrocode "post-merge=>post-merge" \
|
|
-setambles "gfi-run=>gfi-run" --setambles "post-commit=>post-commit" --setambles "post-merge=>post-merge" \
|
|
-comment "gfi-run=>gfi-run" --comment "post-commit=>post-commit" --comment "post-merge=>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\
|
|
gitfile-info/gfi-run gitfile-info/post-commit gitfile-info/post-merge
|
|
|