Select Git revision
test_hg_beam.py
-
Daniel Brown authored
adding in block selector to loadkatfile and parsecommands, so that it only reads in certain blocks. Fixed factorial code in HG_beam
Daniel Brown authoredadding in block selector to loadkatfile and parsecommands, so that it only reads in certain blocks. Fixed factorial code in HG_beam
git-tag.sh 599 B
#!/bin/bash
FILE="$1"
if [ "x$FILE" = x ]; then
echo "usage: $0 <file.tex>" >&2
exit 1
fi
TMPFILE="$FILE.tmp"
gitLOG=`git log -1 --pretty="format:%% generated by $0
\\newcommand{\\commitDATE}{%ai}
\\newcommand{\\commitID}{commitID: %H}
\\newcommand{\\commitIDshort}{commitID: %h}
"`
echo "$gitLOG" > $TMPFILE
diffcmd="git diff -- .";
diff=`$diffcmd`;
if test -n "$diff"; then
echo "\\newcommand{\\commitSTATUS}{UNCLEAN}" >> $TMPFILE
else
echo "\\newcommand{\\commitSTATUS}{CLEAN}" >> $TMPFILE
fi
if cmp -s $TMPFILE $FILE; then
rm -f $TMPFILE
else
mv -f $TMPFILE $FILE
fi