summaryrefslogtreecommitdiffstats
path: root/configuration/cv
blob: 4822aa021bfeaf6304154ef7c7fdad09da4d10c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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.

# ☡ Si l'on fait un git checkout versionprécédente c'est la
# dernière version (date et empreinte) qui s'affiche

# 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: cv [-f] [-m]'
            exit 1
    esac
    shift
done
export TZ=GMT
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: %at%nCommitter Name: %cn%nCommitter Email: %ce%nCommitter Date: %ct%n" |gawk -v script=log -v full=$full -f ~/config/texmf/cv-git.awk > .cv.tex
if [ "$mod" = 1 ]
then
  git status |gawk -v script=status -f ~/config/texmf/cv-git.awk >> .cv.tex
fi