2 # List the specified version-controlled files.
4 # Copyright (C) 2006 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.
22 # This script must be run solely from the top of a $srcdir build directory.
24 # If there's an argument, it must be a single, "."-relative directory name,
25 # with no trailing slashes. In mercurial mode, it's used as part of a
26 # "grep" pattern (prepend "^", append "/"), and in cvs mode, it's simply
27 # used as an argument to the cvsu script.
32 1) include_prefix
=$1 ;;
33 *) echo "$0: too many arguments" 1>&2; exit 1 ;;
37 if test "x$include_prefix" = x
; then
38 git-ls-files | cut
-d ' ' -f 3
40 git-ls-files | cut
-d ' ' -f 3 |
grep "^$include_prefix/"
42 elif test -d .hg
; then
43 if test "x$include_prefix" = x
; then
44 hg manifest | cut
-d ' ' -f 3
46 hg manifest | cut
-d ' ' -f 3 |
grep "^$include_prefix/"
48 elif test -x build-aux
/cvsu
; then
49 build-aux
/cvsu
--find --types=AFGM
$include_prefix
52 if (!$1 && $3 !~ /^-/) { \
54 sub(/CVS\/Entries/, "", f); \
57 $
(find ${*-*} -name Entries
-print) /dev
/null
;