aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2006-07-18 16:00:24 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2006-07-18 16:00:24 +0000
commit4fef468eb1c1c19be596253217a52200bb20408b (patch)
treebb8c9f8b77e1db6a9da480f2aabff188d932e31d /scripts
parent4291b3e4c44729af6cb03d28d3fe4bf21b3a13a6 (diff)
downloadman-pages-4fef468eb1c1c19be596253217a52200bb20408b.tar.gz
Allow multiple directory command-line arguments
Diffstat (limited to 'scripts')
-rw-r--r--scripts/FIXME_list.sh85
1 files changed, 44 insertions, 41 deletions
diff --git a/scripts/FIXME_list.sh b/scripts/FIXME_list.sh
index a2e6ec41a8..22adaff4ba 100644
--- a/scripts/FIXME_list.sh
+++ b/scripts/FIXME_list.sh
@@ -29,48 +29,51 @@ if test $# -eq 0; then
echo "Usage: $0 [-a] pathname" 1>&2
exit 1;
fi
-
-for page in $(find $1 -type f -name '*.[1-9]' \
- -exec grep -l FIXME {} \; | sort)
+for dir in "$@";
do
- cat $page | awk -v SHOW_ALL=$show_all -v PAGE_NAME=$page '
- BEGIN {
- page_FIXME_cnt = 0;
- }
-
- /FIXME/ {
-
- # /.\" FIXME . / ==> do not display this FIXME, unless
- # -a command-line option was supplied
-
- if (!($0 ~ /^\.\\\" FIXME \./ ) || SHOW_ALL == "y") {
- if (page_FIXME_cnt == 0) {
- print "==========";
- print PAGE_NAME;
- }
- page_FIXME_cnt++;
-
- finished = 0;
- do {
- print $0;
+ for page in $(find "$dir" -type f -name '*.[1-9]' \
+ -exec grep -l FIXME {} \; | sort)
+ do
+ cat "$page" | awk -v SHOW_ALL=$show_all -v PAGE_NAME="$page" \
+ '
+ BEGIN {
+ page_FIXME_cnt = 0;
+ }
+
+ /FIXME/ {
+
+ # /.\" FIXME . / ==> do not display this FIXME, unless
+ # -a command-line option was supplied
+
+ if (!($0 ~ /^\.\\\" FIXME \./ ) || SHOW_ALL == "y") {
+ if (page_FIXME_cnt == 0) {
+ print "==========";
+ print PAGE_NAME;
+ }
+ page_FIXME_cnt++;
- # Implicit end of FIXME is end-of-file or a line
- # that is not a comment
-
- if (getline == 0)
- finished = 1;
-
- if (!($0 ~ /^.\\\"/))
- finished = 1;
+ finished = 0;
+ do {
+ print $0;
+
+ # Implicit end of FIXME is end-of-file or a line
+ # that is not a comment
- # /.\" .$/ ==> Explicit end of FIXME
+ if (getline == 0)
+ finished = 1;
- if ($0 ~ /^.\\\" \.$/)
- finished = 1;
- } while (!finished);
-
- print "";
- }
- }
- '
-done | sed -e 's/^\.\\"/ /' | sed -e 's/ *$//' | cat -s
+ if (!($0 ~ /^.\\\"/))
+ finished = 1;
+
+ # /.\" .$/ ==> Explicit end of FIXME
+
+ if ($0 ~ /^.\\\" \.$/)
+ finished = 1;
+ } while (!finished);
+
+ print "";
+ }
+ }
+ '
+ done | sed -e 's/^\.\\"/ /' | sed -e 's/ *$//' | cat -s
+done