aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-11-17 15:04:56 +0000
committerEli Zaretskii2001-11-17 15:04:56 +0000
commite5cca6142c221f2491ade9b8accea2b1db3dafec (patch)
treea1736732207871499433d5aedea621e66bf71572
parentc976c1d4920d244482ce3f3761989f14a6144ee0 (diff)
downloademacs-e5cca6142c221f2491ade9b8accea2b1db3dafec.tar.gz
emacs-e5cca6142c221f2491ade9b8accea2b1db3dafec.zip
Don't depend on csh-specific features. Replace
the interpreter name with /bin/sh.
-rw-r--r--lispref/permute-index13
1 files changed, 8 insertions, 5 deletions
diff --git a/lispref/permute-index b/lispref/permute-index
index 4166e78ece1..b2dfb771f14 100644
--- a/lispref/permute-index
+++ b/lispref/permute-index
@@ -1,4 +1,4 @@
1#!/bin/csh -f 1#!/bin/sh
2# Generate a permuted index of all names. 2# Generate a permuted index of all names.
3# The result is a file called index.fns. 3# The result is a file called index.fns.
4 4
@@ -45,6 +45,7 @@ echo "Extract raw index from texinfo fn index."
45# change '\ ' to ' ' 45# change '\ ' to ' '
46# change lines with = < > since they mess up field extraction. 46# change lines with = < > since they mess up field extraction.
47# separate into fields delimited by " 47# separate into fields delimited by "
48rm -f permuted.raw
48cat ${MANUAL}.fn | \ 49cat ${MANUAL}.fn | \
49 sed \ 50 sed \
50 -e 's/(\([^)]*\))/\1/' \ 51 -e 's/(\([^)]*\))/\1/' \
@@ -57,7 +58,7 @@ cat ${MANUAL}.fn | \
57 -e 's/{\\tt\\gtr}/>/' \ 58 -e 's/{\\tt\\gtr}/>/' \
58 -e 's/{\\tt\\less}/</' \ 59 -e 's/{\\tt\\less}/</' \
59 -e 's/}{/"/g' \ 60 -e 's/}{/"/g' \
60 | awk -F\" '{print $2, $1}' >! permuted.raw 61 | awk -F\" '{print $2, $1}' > permuted.raw
61 62
622: 632:
63# Build break file for ptx. 64# Build break file for ptx.
@@ -66,7 +67,7 @@ cat <<EOF > permuted.break
66: 67:
67EOF 68EOF
68# Build the ignore file for ptx. 69# Build the ignore file for ptx.
69# We would like to ignore "and", "or", and "for", 70# We would like to ignore "and", "or", and "for",
70# but ptx ignores ignore words even if they stand alone. 71# but ptx ignores ignore words even if they stand alone.
71cat <<EOF > permuted.ignore 72cat <<EOF > permuted.ignore
72the 73the
@@ -84,12 +85,14 @@ by
84EOF 85EOF
85 86
86echo "Make troff permuted index." 87echo "Make troff permuted index."
88rm -f permuted.t
87ptx -i permuted.ignore -b permuted.break -f -r -w 144 \ 89ptx -i permuted.ignore -b permuted.break -f -r -w 144 \
88 < permuted.raw >! permuted.t 90 < permuted.raw > permuted.t
89 91
903: 923:
91echo "Extract the desired fields." 93echo "Extract the desired fields."
92awk -F\" '{printf "%s\"%s\"%s\n", $4,$6,$9}' permuted.t >! permuted.fields 94rm -f permuted.fields
95awk -F\" '{printf "%s\"%s\"%s\n", $4,$6,$9}' permuted.t > permuted.fields
93 96
944: 974:
95echo "Format for texindex." 98echo "Format for texindex."