On 05/16/2011 03:44 PM, Sam Steingold wrote: >> * Eric Blake <roy...@erqung.pbz> [2011-05-16 15:30:04 -0600]: >> >>> why doesn't vc-list-files accept a list of directories? >> >> Patches welcome; seems like a useful addition. >
> @@ -61,16 +61,10 @@ EOF > shift; shift ;; > esac > > -dir= > -case $# in > - 0) ;; > - 1) dir=$1 ;; > - *) echo "$0: too many arguments" 1>&2 > - echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;; > -esac > - > -test "x$dir" = x && dir=. > +dirs=$* This isn't safe if any arguments contain whitespace. Why not iterate directly over $@ in that case, rather than assigning to an intermediate $dirs only to then reiterate? > +test "x$dirs" = x && dirs=. Which means this would be written: test $# = 0 && set . > > +for dir in $dirs; do > if test -d .git; then > test "x$dir" = x. \ > && dir= sed_esc= \ > @@ -108,6 +102,7 @@ else > echo "$0: Failed to determine type of version control used in `pwd`" 1>&2 > exit 1 > fi > +done > Of course, we'd want to reindent the loop body, as well. >> Where is it hard-coded? We've been trying to get rid of hard-coded >> aspects, but we can only fix things as they are pointed out. > > --- /home2/sds/src/clisp/current/gnulib/top/maint.mk 2011-05-16 > 16:32:49.000000000 -0400 > +++ /home2/sds/src/clisp/current/maint.mk 2011-05-16 17:20:23.000000000 > -0400 > @@ -681,7 +681,7 @@ sc_useless_cpp_parens: > # #if HAVE_HEADER_H that you remove, be sure that your project explicitly > # requires the gnulib module that guarantees the usability of that header. > gl_assured_headers_ = \ > - cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//g' > + cd $(gnulib_dir) && echo *.in.h|sed 's/\.in\.h//g' NACK. This is one case where we are looking at the gnulib source directory (such as $GNULIB_SRCDIR), to see files from gnulib.git, and _not_ in the resulting --libdir location of your project. This hard-code is correct. > -v_etc_file = $(gnulib_dir)/lib/version-etc.c > +v_etc_file = $(gnulib_dir)/version-etc.c Same NACK. Again, this is a case where we are looking at a file living in gnulib.git, and not what got copied into your project. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature