-
Notifications
You must be signed in to change notification settings - Fork 4
/
cl
executable file
·52 lines (47 loc) · 1.03 KB
/
cl
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
#!/usr/bin/env bash
#=======================================================================
# cl
# File ID: 446af502-fa61-11dd-aef2-0001805bf4b1
# Latskap. Lister ut loggen for Subversion, SVK eller CVS.
#
# Valg (Må spesifiseres alfabetisk):
#
# -k
# Bruk svk istedenfor svn.
# -s
# Bruk --stop-on-copy.
#=======================================================================
if [ "$1" = "-k" ]; then
use_svk=1
shift
else
use_svk=0
fi
if [ "$1" = "-s" ]; then
use_stop=1
stoponcopy=' --stop-on-copy'
svk_cross=''
shift
else
use_stop=0
stoponcopy=''
svk_cross=' --cross'
fi
git log HEAD..HEAD >/dev/null 2>&1
if [ "$?" = "0" ]; then
git log --name-status --decorate=short -C -M "$@"
exit
fi
if [ -d .svn/. ]; then
if [ "$use_svk" = "1" ]; then
svk log$svk_cross "$@" | less
else
svn log$stoponcopy "$@" | less
fi
elif [ -d CVS/. ]; then
cvs log$stoponcopy "$@" | sortcvs | less
else
if [ "$use_svk" = "1" ]; then
svk log$svk_cross "$@" | less
fi
fi