bigsh: Get rid of warning about missing font, delete `-fb` from xterm
[sunny256-utils.git] / cdiff
blobf4f776bf863e3f946f5a21bcda18f5db7d410b3f
1 #!/usr/bin/env bash
3 # cdiff
4 # File ID: 45f660ac-fa5f-11dd-9262-0001805bf4b1
5 # Latskapen lenge leve. Kjører en svn eller cvs diff og stripper bort alle
6 # ukjente filer.
8 git log HEAD..HEAD >/dev/null 2>&1
9 if [ "$?" = "0" ]; then
10 git diff "$@"
11 exit
14 if [ -d .svn/. ]; then
15 if [ "$1" = "-s" ]; then
16 shift
17 svn diff $* 2>/dev/null | grep -v '^\? ' | egrep '^[+\-]' | less -S
18 else
19 svn diff $* 2>/dev/null | grep -v '^\? ' | less -S
21 elif [ -d CVS/. ]; then
22 if [ "$1" = "-s" ]; then
23 shift
24 cvs -n diff -u $* 2>/dev/null | grep -v '^\? ' | egrep '^[+\-]' | less -S
25 else
26 cvs -n diff -u $* 2>/dev/null | grep -v '^\? ' | less -S
28 else
29 git diff --color "$@"