2 # List version-controlled file names.
4 # Copyright (C) 2006-2008 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 # List the specified version-controlled files.
21 # With no argument, list them all. With a single DIRECTORY argument,
22 # list the version-controlled files in that directory.
23 # This script must be run solely from the top of a $srcdir build directory.
25 # If there's an argument, it must be a single, "."-relative directory name.
26 # cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
32 *) echo "$0: too many arguments" 1>&2
33 echo "Usage: $0 [DIR]" 1>&2; exit 1;;
36 test "x$dir" = x && dir=.
39 exec git ls-files "$dir"
40 elif test -d .hg; then
41 exec hg locate "$dir/*"
42 elif test -d CVS; then
43 if test -x build-aux/cvsu; then
44 build-aux/cvsu --find --types=AFGM "$dir"
47 if (!$1 && $3 !~ /^-/) { \
49 sub(/CVS\/Entries/, "", f); \
52 $(find ${*-*} -name Entries -print) /dev/null;
55 echo "$0: Failed to determine type of version control used in "`pwd` 1>&2