aboutsummaryrefslogtreecommitdiffstats
path: root/tools/status
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@fripost.org>2019-11-18 13:54:15 +0100
committerGustav Eek <gustav.eek@fripost.org>2019-11-18 13:54:15 +0100
commit5b8c342bfbedbd6b49f58c1dc8742a21d97d3a8f (patch)
tree610b45c94b1860df0c7161677bd8d1ce0a019f47 /tools/status
parent00daafa14e30c5ad4ad02878f56ca9759c3de00a (diff)
Status tool. Initial on tool to review minutes status.
Diffstat (limited to 'tools/status')
-rwxr-xr-xtools/status21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/status b/tools/status
new file mode 100755
index 0000000..a95737d
--- /dev/null
+++ b/tools/status
@@ -0,0 +1,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)" {}
+