X-Git-Url: https://code.communitydata.science/cdsc_tex.git/blobdiff_plain/f3b3d82957b088986655075565abaa51d4ccbff7..d449d749d8456a657f61509a355b2b0b9e7e5dca:/paper_template/resources/vc-git diff --git a/paper_template/resources/vc-git b/paper_template/resources/vc-git new file mode 100755 index 0000000..557a573 --- /dev/null +++ b/paper_template/resources/vc-git @@ -0,0 +1,24 @@ +#!/bin/sh +# This is file 'vc' from the vc bundle for TeX. +# The original file can be found at CTAN:support/vc. +# This file is Public Domain. + +# Parse command line options. +full=0 +mod=0 +while [ -n "$(echo $1 | grep '-')" ]; do + case $1 in + -f ) full=1 ;; + -m ) mod=1 ;; + * ) echo 'usage: vc [-f] [-m]' + exit 1 + esac + shift +done +# English locale. +LC_ALL=C +git --no-pager log -1 HEAD --pretty=format:"Hash: %H%nAbr. Hash: %h%nParent Hashes: %P%nAbr. Parent Hashes: %p%nAuthor Name: %an%nAuthor Email: %ae%nAuthor Date: %ai%nCommitter Name: %cn%nCommitter Email: %ce%nCommitter Date: %ci%n" |gawk -v script=log -v full=$full -f ~/bin/vc-git.awk > vc +if [ "$mod" = 1 ] +then + git status |gawk -v script=status -f ~/bin/vc-git.awk >> vc +fi