diff options
author | Bruno Haible <bruno@clisp.org> | 2010-02-19 12:15:16 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2010-02-19 12:15:16 +0100 |
commit | e190c6630d13363e72ec421e4734ae255c70fbc5 (patch) | |
tree | f6bf6e0ef3c4e2aa265c161b1c30a4f19be4890d /gnulib-tool | |
parent | dbb3c91f97905f9ef30ca8ea52d5cf2a862e7762 (diff) | |
download | gnulib-e190c6630d13363e72ec421e4734ae255c70fbc5.tar.gz |
Tweak last commit: Reduce the candidate list.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-x | gnulib-tool | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gnulib-tool b/gnulib-tool index ef2bd46b71..a5c48cae74 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -5022,19 +5022,20 @@ s/\([.*$]\)/[\1]/g' do if test -f "$gnulib_dir/$filename" \ || { test -n "$local_gnulib_dir" && test -f "$local_gnulib_dir/$filename"; }; then - filenameregex='^'`echo "$filename" | sed -e "$sed_literal_to_basic_regex"`'$' + filename_anywhere_regex=`echo "$filename" | sed -e "$sed_literal_to_basic_regex"` + filename_line_regex='^'"$filename_anywhere_regex"'$' module_candidates=` { - (cd "$gnulib_dir" && find modules -type f -print | xargs -n 100 grep -l "$filenameregex" /dev/null | sed -e 's,^modules/,,') + (cd "$gnulib_dir" && find modules -type f -print | xargs -n 100 grep -l "$filename_line_regex" /dev/null | sed -e 's,^modules/,,') if test -n "$local_gnulib_dir" && test -d "$local_gnulib_dir/modules"; then - (cd "$local_gnulib_dir" && find modules -type f -print | sed -e 's,^modules/,,' -e 's,\.diff$,,') + (cd "$local_gnulib_dir" && find modules -type f -print | xargs -n 100 grep -l "$filename_anywhere_regex" /dev/null | sed -e 's,^modules/,,' -e 's,\.diff$,,') fi } \ | func_sanitize_modulelist \ | LC_ALL=C sort -u ` for module in $module_candidates; do - if func_get_filelist $module | grep "$filenameregex" > /dev/null; then + if func_get_filelist $module | grep "$filename_line_regex" > /dev/null; then echo $module fi done |