summaryrefslogtreecommitdiff
path: root/build-aux/vc-list-files
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/vc-list-files')
-rwxr-xr-xbuild-aux/vc-list-files41
1 files changed, 16 insertions, 25 deletions
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index c6d360822..72a6f549c 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -21,39 +21,30 @@
# With no argument, list them all.
# This script must be run solely from the top of a $srcdir build directory.
-# If there's an argument, it must be a single, "."-relative directory name,
-# with no trailing slashes. In mercurial mode, it's used as part of a
-# "grep" pattern (prepend "^", append "/"), and in cvs mode, it's simply
-# used as an argument to the cvsu script.
+# If there's an argument, it must be a single, "."-relative directory name.
# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
-include_prefix=
+dir=
case $# in
0) ;;
- 1) include_prefix=$1 ;;
+ 1) dir=$1 ;;
*) echo "$0: too many arguments" 1>&2; exit 1 ;;
esac
-if test -d .git; then
- if test "x$include_prefix" = x; then
- git-ls-files
- else
- git-ls-files | grep "^$include_prefix/"
- fi
-elif test -d .hg; then
- if test "x$include_prefix" = x; then
- hg manifest | cut -d ' ' -f 2
+test "x$dir" = x && dir=.
+
+if test -d CVS; then
+ if test -x build-aux/cvsu; then
+ build-aux/cvsu --find --types=AFGM "$dir"
else
- hg manifest | cut -d ' ' -f 2 | grep "^$include_prefix/"
+ awk -F/ '{ \
+ if (!$1 && $3 !~ /^-/) { \
+ f=FILENAME; \
+ sub(/CVS\/Entries/, "", f); \
+ print f $2; \
+ }}' \
+ $(find ${*-*} -name Entries -print) /dev/null;
fi
-elif test -x build-aux/cvsu; then
- build-aux/cvsu --find --types=AFGM $include_prefix
else
- awk -F/ '{ \
- if (!$1 && $3 !~ /^-/) { \
- f=FILENAME; \
- sub(/CVS\/Entries/, "", f); \
- print f $2; \
- }}' \
- $(find ${*-*} -name Entries -print) /dev/null;
+ git-ls-files "$dir"
fi