aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
authorMichael Kerrisk <mtk.manpages@gmail.com>2007-06-09 12:41:40 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2007-06-09 12:41:40 +0000
commit3511dcdbf52e2ef2601ced54f707d3bc0fe6cc24 (patch)
tree9cefff8b20461516181ed8b8acbe61e456f7d2a9 /scripts
parentad4dd40414cb629f107bcf3784ea9bdcbbacf980 (diff)
downloadman-pages-3511dcdbf52e2ef2601ced54f707d3bc0fe6cc24.tar.gz
minor fixes
Diffstat (limited to 'scripts')
-rw-r--r--scripts/FIXME_list.sh6
-rw-r--r--scripts/add_parens_for_own_funcs.sh14
-rw-r--r--scripts/find_dots_no_parens.sh1
-rw-r--r--scripts/unformat_parens.sh4
4 files changed, 13 insertions, 12 deletions
diff --git a/scripts/FIXME_list.sh b/scripts/FIXME_list.sh
index 22adaff4ba..e823801061 100644
--- a/scripts/FIXME_list.sh
+++ b/scripts/FIXME_list.sh
@@ -23,14 +23,14 @@ while getopts "a" optname; do
esac
done
-shift $(( OPTIND - 1 ))
+shift $(( $OPTIND - 1 ))
if test $# -eq 0; then
echo "Usage: $0 [-a] pathname" 1>&2
exit 1;
fi
-for dir in "$@";
-do
+
+for dir in "$@"; do
for page in $(find "$dir" -type f -name '*.[1-9]' \
-exec grep -l FIXME {} \; | sort)
do
diff --git a/scripts/add_parens_for_own_funcs.sh b/scripts/add_parens_for_own_funcs.sh
index 25be729601..3d131ff24e 100644
--- a/scripts/add_parens_for_own_funcs.sh
+++ b/scripts/add_parens_for_own_funcs.sh
@@ -19,7 +19,7 @@
# Try to substitute instances of that name on the page.
# (instances are considered to be words formatted
# using ^.[BI] or \f[BI]...\f[PR] -- this script
-# ignores unformatted instances on function names.)
+# ignores unformatted instances of function names.)
# fi
# done
# done
@@ -81,11 +81,11 @@ while getopts "n" optname; do
esac
done
-shift $(( OPTIND - 1 ))
+shift $(( $OPTIND - 1 ))
# Only process files with > 1 line -- single-line files are link files
-for page in $(wc $* 2> /dev/null | awk '$1 > 1 {print $4}'| \
+for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
grep -v '^total'); do
echo ">>>>>>>>>>>>>>>>>>>>>>>>>" $page "<<<<<<<<<<<<<<<<<<<<<<<<<"
@@ -96,10 +96,10 @@ for page in $(wc $* 2> /dev/null | awk '$1 > 1 {print $4}'| \
sh_nlist=$(cat $page | \
awk 'BEGIN { p = 0 }
- /^\.SH NAME/ { p = NR }
- /^.SH/ && NR > p { p = 0 } # Stop at the next .SH directive
- p > 0 && NR > p {print $0} # These are the lines between
- # the two .SH directives
+ /^\.SH NAME/ { p = NR }
+ /^.SH/ && NR > p { p = 0 } # Stop at the next .SH directive
+ p > 0 && NR > p { print $0 } # These are the lines between
+ # the two .SH directives
')
sh_nlist=$(echo $sh_nlist | sed -e 's/ *\\-.*//' -e 's/, */ /g')
echo "### .SH name list:" $sh_nlist
diff --git a/scripts/find_dots_no_parens.sh b/scripts/find_dots_no_parens.sh
index b30c7d5272..f772305cf9 100644
--- a/scripts/find_dots_no_parens.sh
+++ b/scripts/find_dots_no_parens.sh
@@ -40,6 +40,7 @@ rm -f $awk_script_file
# We grep out a few page names that are likely to generate false
# positives...
+
echo '{' >> $awk_script_file
echo ' myvar = $2;' >> $awk_script_file
echo ' gsub("[^a-z_0-9]*$", "", myvar);' >> $awk_script_file
diff --git a/scripts/unformat_parens.sh b/scripts/unformat_parens.sh
index ab2352be71..977994d234 100644
--- a/scripts/unformat_parens.sh
+++ b/scripts/unformat_parens.sh
@@ -41,11 +41,11 @@ while getopts "n" optname; do
esac
done
-shift $(( OPTIND - 1 ))
+shift $(( $OPTIND - 1 ))
# Only process files with > 1 line -- single-line files are link files
-for page in $(wc $* 2> /dev/null | awk '$1 > 1 {print $4}'| \
+for page in $(wc "$@" 2> /dev/null | awk '$1 > 1 {print $4}'| \
grep -v '^total'); do
cp $page $work_dst_file