File: purity.sh

package info (click to toggle)
acl2 7.2dfsg-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 198,968 kB
  • ctags: 182,300
  • sloc: lisp: 2,415,261; ansic: 5,675; perl: 5,577; xml: 3,576; sh: 3,255; cpp: 2,835; makefile: 2,440; ruby: 2,402; python: 778; ml: 763; yacc: 709; csh: 355; php: 171; lex: 162; tcl: 44; java: 24; asm: 23; haskell: 17
file content (59 lines) | stat: -rwxr-xr-x 1,698 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh

# This script checks that only Matt Kaufmann has committed to files
# outside books/.  If others are to be included, update the first call
# of basecmd below.

if [ `basename $PWD` = devel ] ; then \
    echo "ERROR: Must not be in a devel directory." ; \
    exit 1 ; \
fi

export PAGER=cat

# Matt might update this when confident of purity since the indicated date.
export SINCE=2016-01-11

export basecmd="\
git log \
 --name-only \
 --pretty=oneline \
 --since $SINCE"

# Warning: Do not skip this fetch!  In particular, pull.sh relies on it.
echo "Executing git fetch --all"
git fetch --all
echo "-----"

$basecmd \
  --author='Matt Kaufmann <kaufmann@horatio-168.cs.utexas.edu>' \
  --author='Matt Kaufmann <kaufmann@cs.utexas.edu>' \
  --author='MattKaufmann <matthew.j.kaufmann@gmail.com>' \
  --author='kaufmann <kaufmann@unknown58b035fde782.attlocal.net>' \
  --author='Matt Kaufmann <kaufmann@matts-mbp.attlocal.net>' \
  --author='Matt Kaufmann <kaufmann@Matts-MBP.attlocal.net>' \
  --author="Matt Kaufmann <kaufmann@Matts-MacBook-Pro.local>" \
  | grep -v '^[a-z0-9]\{40\}' \
  | grep -v '^books/' \
  > /tmp/git-log-matt.txt

$basecmd \
  | grep -v '^[a-z0-9]\{40\}' \
  | grep -v '^books/' \
  > /tmp/git-log-all.txt

export out_all=gitlog-all.txt

export diffcmd='diff /tmp/git-log-matt.txt /tmp/git-log-all.txt'
$diffcmd
if [ $? -ne 0 ] ; then \
    echo "-----"
    echo "ERROR: Someone committed to other than books/!" ; \
    echo "-----"
    git log --name-only --since $SINCE > $out_all
    echo "Search for the above file in $out_all."
    echo "If all is well, change SINCE in $0 to the date of the problem commit."
    exit 1 ; \
else
    echo "$0 PASSED."
fi