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 2, or (at your option)
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, write to the Free Software Foundation,
18 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # List the specified version-controlled files.
22 # With no argument, list them all.
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 # with no trailing slashes. In mercurial mode, it's used as part of a
27 # "grep" pattern (prepend "^", append "/"), and in cvs mode, it's simply
28 # used as an argument to the cvsu script.
33 1) include_prefix
=$1 ;;
34 *) echo "$0: too many arguments" 1>&2; exit 1 ;;
38 if test "x$include_prefix" = x
; then
39 git-ls-files | cut
-d ' ' -f 3
41 git-ls-files | cut
-d ' ' -f 3 |
grep "^$include_prefix/"
43 elif test -d .hg
; then
44 if test "x$include_prefix" = x
; then
45 hg manifest | cut
-d ' ' -f 3
47 hg manifest | cut
-d ' ' -f 3 |
grep "^$include_prefix/"
49 elif test -x build-aux
/cvsu
; then
50 build-aux
/cvsu
--find --types=AFGM
$include_prefix
53 if (!$1 && $3 !~ /^-/) { \
55 sub(/CVS\/Entries/, "", f); \
58 $
(find ${*-*} -name Entries
-print) /dev
/null
;