blob: a95737dec63f4ac16f73063ede393e9735b74927 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env bash
y=$(basename $(pwd))
b=$(git branch | grep '\*' | tr '*' ' ')
if ! [[ $y =~ ^[0-9]*$ ]]; then
echo "${0##*/}: E: Not year. Exit."
exit 1
fi
echo "Minues tex files $y on $b:"
ls -1 $y*.tex | while read f; do
wc=$(cat $f | sed '/begin{document}/,/end{document}/ p; d' | wc -w)
echo " $(printf '%s %4.d' $f $wc)"
done
echo "Local branches of $y:"
git branch | grep "master\|$y" | tr '*' ' ' \
| xargs -I{} -n1 git log -n1 \
--pretty=format:" {} - %h -%d%n %s%n (%an, %ad, %cr)" {}
|