summaryrefslogtreecommitdiff
path: root/scripts/cvsversion
authorzecke <zecke>2002-07-23 12:21:02 (UTC)
committer zecke <zecke>2002-07-23 12:21:02 (UTC)
commit1a52af777b36e92b5c8414b1438d0889c42ad8de (patch) (side-by-side diff)
tree787cb9996fc3ba6f559000b2435129be515033c8 /scripts/cvsversion
parent32724310c6563a52f61ea99d8a0e34df6f973faf (diff)
downloadopie-1a52af777b36e92b5c8414b1438d0889c42ad8de.zip
opie-1a52af777b36e92b5c8414b1438d0889c42ad8de.tar.gz
opie-1a52af777b36e92b5c8414b1438d0889c42ad8de.tar.bz2
some neat KDE scripts which makes living with
cvs more easy Carsten said I should commit then
Diffstat (limited to 'scripts/cvsversion') (more/less context) (show whitespace changes)
-rw-r--r--scripts/cvsversion33
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/cvsversion b/scripts/cvsversion
new file mode 100644
index 0000000..e14d16d
--- a/dev/null
+++ b/scripts/cvsversion
@@ -0,0 +1,33 @@
+#!/bin/sh
+d=`dirname $1`
+f=`basename $1`
+cat $d/CVS/Entries | grep "\/$f\/" | gawk 'BEGIN { FS = "/" } { print $3 }'
+exit 0
+
+=head1 NAME
+
+cvsversion -- Displays version of the file passed as argument.
+
+=head1 SYNOPSIS
+
+ cvsversion <file>
+
+=head1 DESCRIPTION
+
+cvsversion displays the version in CVS of a file, as known by the local
+checked out directory. No connection is required to the CVS server.
+It can be used in other scripts, or simply to ask
+for diffs using
+
+cvs diff -r <version> [-r <version>] <file>
+
+=head1 EXAMPLES
+
+ cd baseline/kdelibs ; cvsversion configure.in
+ cvsversion baseline/kdelibs/configure.in
+
+=head1 AUTHOR
+
+David Faure <faure@kde.org>
+
+=cut \ No newline at end of file