2 # update-info -- update dir file from all extant info pages.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, you can either send email to this
16 # program's maintainer or write to: The Free Software Foundation,
17 # Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
19 # Author: rhawes@dmapub.dma.org. Please report bugs to him.
21 # run this program to install update-info
22 # ###SECTION 0### install script
23 # These constants set the version numbers for both files:
28 if test -z "$TMPDIR"; then
32 TMP_SED
="$TMPDIR/uss$$.info"
33 TMP_F_ADD_SECTION
="$TMPDIR/ufa$$.info"
34 TMP_F_DELETE_INVALID
="$TMPDIR/ufd$$.info"
35 TMP_F_INSERT_MISSING
="$TMPDIR/ufi$$.info"
36 TMP_FILES
="$TMP_SED $TMP_F_ADD_SECTION $TMP_F_DELETE_INVALID\
37 $TMP_F_INSERT_MISSING"
39 trap 'rm -f $TMP_FILES' 0
42 UPDATE_INFO
="/^# _file: 'update-info'_/"
43 UPDATE_INFO_F
="/^# _file: 'update-info.f'_/"
46 echo 'Item_Num=`expr "$Item_Num" + "1"`
47 echo "$1">>"$TMP_SECTIONS"
48 if test "$Item_Status"; then
49 Item_Status=`echo "${Item_Status}
53 fi '>$TMP_F_ADD_SECTION
56 echo 'if test -z "$Create_Node"; then
57 rm -f ${Info_Node}.old
58 cp $Info_Node ${Info_Node}.old
65 q"|ed -s $Info_Node>/dev/null'>$TMP_F_INSERT_MISSING
69 rm -f ${Info_Node}.old
70 cp $Info_Node ${Info_Node}.old
75 q"|ed -s $Info_Node>/dev/null
76 sed -f "$TMP_SED" "$TMP_MENU">>"$Info_Node"'>$TMP_F_DELETE_INVALID
78 cat<<Sed_Script_EOF>$TMP_SED
79 s/@UPDATE_INFO_VERSION@/$PROGRAM_VERSION/g
80 s/@TEXINFO_VERSION@/$PACKAGE_VERSION/g
81 s/@SET_ITEM@/Item_Status=\`echo "\$Item_Status"|sed -e "\${1}s%^.*%\${2}%"\`/
82 /@F_ADD_SECTION@/r $TMP_F_ADD_SECTION
84 /@F_DELETE_INVALID@/r $TMP_F_DELETE_INVALID
86 /@F_INSERT_MISSING@/r $TMP_F_INSERT_MISSING
90 sed -e "1,${UPDATE_INFO}d" -e "$UPDATE_INFO_F,\$d" -f $TMP_SED $0>update-info
91 sed -e "1,${UPDATE_INFO_F}d" -f $TMP_SED $0>update-info.f
92 chmod +x update-info update-info.f
93 echo "installed update-info, and update-info.f into `pwd`"
97 # _file: 'update-info'_
99 #update-info (GNU texinfo @TEXINFO_VERSION@) @UPDATE_INFO_VERSION@
100 #Copyright (C) 1997 Free Software Foundation, Inc.
101 #update-info comes with NO WARRANTY, to the extent permitted by law.
102 #You may redistribute copies of update-info
103 #under the terms of the GNU General Public License.
104 #For more information about these matters, see the files named COPYING."
105 #Author: Richard L. Hawes
107 # ###SECTION 1### Constants
110 if test -z "$TMPDIR"; then
113 if test -z "$LINES"; then
116 if test -z "$COLUMNS"; then
119 if test -z "$EDITOR"; then
122 if test -z "$LINENO"; then
125 # constants redefined by update-info.f
126 PROMPT1
="(y=yes, Y=yes to all, n=no, N=No to all):"
130 DISPLAY_NUM
=`expr "$LINES" - 4`
132 DIR_SECTION
="^INFO-DIR-SECTION"
133 ENTRY_END
="^END-INFO-DIR-ENTRY"
134 ENTRY_START
="^START-INFO-DIR-ENTRY"
135 MENU_BEGIN
='^\*\([ ]\)\{1,\}Menu:'
136 MENU_ITEM
='^\* ([^ ]).*:([ ])+\('
137 SECTION_TITLE
="^[A-Za-z0-9]"
138 MENU_FILTER1
='s/^\*\([ ]\)\{1,\}/* /'
139 MENU_FILTER2
='s/\([ ]\)\{1,\}$//g'
140 TMP_ITEM
="${TMPDIR}/ui${$}.info"
141 TMP_LIST
="${TMPDIR}/ul${$}.info"
142 TMP_MENU
="${TMPDIR}/um${$}.info"
143 TMP_SECTIONS
="${TMPDIR}/us${$}.info" # used only in Detect_Missing
144 TMP_SED
="$TMP_SECTIONS" # used only in Detect_Invalid routines
145 TMP_FILE1
="${TMPDIR}/ux${$}.info"
146 TMP_FILE2
="${TMPDIR}/uy${$}.info"
147 TMP_COUNT
="$TMP_FILE2"
148 TMP_FILE_LIST
="$TMP_LIST $TMP_MENU $TMP_SECTIONS $TMP_FILE1 $TMP_FILE2\
150 TRY_HELP_MSG
="Try --help for more information"
151 if zcat
--version 2>/dev
/null
>/dev
/null
; then
152 CAT_COMMAND
="zcat -f"
154 echo "$0:$LINENO: GNU zcat not found">&2
158 # ###SECTION 100### main program
159 #variables set by options
175 -c) Create_Node
="y";;
176 -ci|
-ic) Create_Node
="y"; Interactive
="y";;
177 -cif|
-cfi|
-ifc|
-icf|
-fci|
-fic) Create_Node
="y"
178 Interactive
="y"; Load_Functions
="";;
179 --debug) set -eux; Debug
="set>&2";;
180 -d|
--delete) Mode
="Detect_Invalid";;
181 -f) Load_Functions
="";;
182 -i|
--interactive) Interactive
="y";;
183 -fi|
-if) Load_Functions
=""; Interactive
="y";;
184 -id|
-di) Mode
="Detect_Invalid"; Interactive
="y";;
188 update-info (GNU texinfo @TEXINFO_VERSION@) @UPDATE_INFO_VERSION@
189 Copyright (C) 1997 Free Software Foundation, Inc.
190 update-info comes with NO WARRANTY, to the extent permitted by law.
191 You may redistribute copies of update-info
192 under the terms of the GNU General Public License.
193 For more information about these matters, see the files named COPYING.
194 Author: Richard L. Hawes
200 Usage: update-info [OPTION]... INFO_PATH/INFO_DIR_FILE
202 It detects and inserts missing menu items into the info node file.
205 -c create a new info node
206 --debug print debug information to standard error path
207 -d, --delete delete invalid menu items (ignore missing menu items)
208 -f do not load functions (file update-info.f)
209 --help print this help message and exit
210 -i, --interactive interactive mode prompts before inserting or removing
212 --version print current version and exit
213 Backup of the info node has a '.old' suffix added. This is a shell script.
214 Files: update-info.f -- contains functions (optional).
215 Environment Variables: COLUMNS, EDITOR, LINES, TMPDIR
216 Email bug reports to bug-texinfo@gnu.org.
220 [-+]*) echo "$0:$LINENO: \"$1\" is not a valid option">&2
221 echo "$TRY_HELP_MSG">&2
228 if test "$#" -lt "1"; then
229 echo "$0:$LINENO: Too few parameters">&2
230 echo "$TRY_HELP_MSG">&2
232 elif test "$#" -gt "1"; then
233 echo "$0:$LINENO: Too many parameters">&2
234 echo "$TRY_HELP_MSG">&2
238 Info_Node
=`basename "$Info_Path"`
239 if echo "$Info_Node"|
grep ".*dir$">/dev
/null
; then
242 echo "$0:$LINENO: $Info_Node is not a valid info node name">&2
245 Info_Pathname
=`dirname "$Info_Path"`
246 cd "$Info_Pathname"||
exit
248 BACKUP_MSG
="Backed up $Info_Node to ${Info_Node}.old."
249 HANGUP_MSG
="Hang up on \"update-info $ARGUMENTS\""
250 INSERT_MSG
="menu item(s) were inserted (not counting duplicates)."
251 INSERT_MSG2
="total menu item(s) were inserted into `pwd`/$Info_Node"
252 DELETE_MSG
="invalid menu item(s) were removed (not counting duplicates)."
253 DELETE_MSG2
="total invalid menu item(s) were removed from `pwd`/$Info_Node"
255 if test "$Create_Node"; then
256 if test "$Mode"; then
257 echo "$0:$LINENO: ERROR: Illogical option combination: -d -c">&2
258 echo "$TRY_HELP_MSG">&2
261 if test -f "$Info_Node"; then
262 rm -f ${Info_Node}.old
263 mv "$Info_Node" "${Info_Node}.old"
266 echo "Creating new Info Node: `pwd`/$Info_Node"
267 cat>$Info_Node<<NodeEndOfFile||exit
269 This is the file .../info/dir, which contains the topmost node of the
270 Info hierarchy. The first time you invoke Info you start off
271 looking at that node, which is (dir)Top.
273 File: dir Node: Top This is the top of the INFO tree
274 This (the Directory node) gives a menu of major topics.
275 Typing "d" returns here, "q" exits, "?" lists all INFO commands, "h"
276 gives a primer for first-timers, "mTexinfo<Return>" visits Texinfo topic,
278 Or click mouse button 2 on a menu item or cross reference to select it.
279 --- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) ---
281 * Menu: The list of major topics begins on the next line.
285 if test ! -f "$Info_Node"; then
286 echo "$0:$LINENO: $Info_Node is irregular or nonexistant">&2
288 elif test ! -r "$Info_Node"; then
289 echo "$0:$LINENO: $Info_Node is not readable">&2
291 elif test ! -w "$Info_Node"; then
292 echo "$0:$LINENO: $Info_Node is not writeable">&2
297 if test "$Load_Functions" -a "$Interactive" -a -z "$Mode"; then
298 if FUNCTIONS_VERSION
=`( update-info.f )`; then
299 if test `echo "$FUNCTIONS_VERSION"\
300 |cut -d' ' -f5` = "@UPDATE_INFO_VERSION@"; then
301 echo "Loading functions..."
304 echo "$0:$LINENO: wrong version of update-info.f">&2
305 echo "(functions were not loaded)">&2
308 echo "(functions were not loaded)">&2
313 trap ' eval "$Debug"; rm -f $TMP_FILE_LIST; exit ' 0
314 if test "$Interactive"; then
315 if test ! -t "1"; then
316 echo "$0:$LINENO: Cannot run in interactive mode "\
317 "standard out is redirected">&2
322 trap ' rm -f $TMP_FILE_LIST
323 echo "$0:$LINENO: received INT signal. All edits are canceled.">&2
325 trap ' rm -f $TMP_FILE_LIST
326 echo "$0:$LINENO: received QUIT signal. All edits are canceled.">&2
329 if test -z "$Mode"; then
331 if test "$Changed"; then
335 Inserts_Total=`wc -c<"$TMP_COUNT"`
336 echo $Inserts_Total $INSERT_MSG2
343 if test "$Changed"; then
347 Invalid_Total=`wc -l<"$TMP_SED"`
348 echo $Invalid_Total $DELETE_MSG2
355 sed -e "1,/$MENU_BEGIN/d" -e "$MENU_FILTER1" -e "$MENU_FILTER2"<$Info_Node\
362 }'|
sort -u>$TMP_FILE1
363 ls -F|
sed -e '/\/$/d' -e '/[-.][0-9]/d'\
364 -e '/:$/d' -e '/^$/d' -e "/^${Info_Node}~\$/d"\
365 -e "/^${Info_Node}\$/d" -e "/^${Info_Node}.old\$/d"\
366 -e 's/\.gz$//' -e 's/\.info$//'|
sort>$TMP_FILE2
368 if test -z "$Mode"; then
370 comm -13 $TMP_FILE1 $TMP_FILE2>$TMP_LIST
371 cat</dev
/null
>$TMP_COUNT
372 #get sections, initialize variables
373 sed -n -e "/$SECTION_TITLE/p" "$TMP_MENU">"$TMP_SECTIONS"
374 Item_Num
=`wc -l<"$TMP_SECTIONS"|tr -d ' '`
376 |awk "BEGIN{for(i=1;i<=${Item_Num};i++)printf(\"_\n\")}"`
378 for Info_Name
in `cat $TMP_LIST`
380 if test -r "$Info_Name"; then
381 Info_File
="$Info_Name"
382 elif test -r "${Info_Name}.info"; then
383 Info_File
="${Info_Name}.info"
384 elif test -r "${Info_Name}.gz"; then
385 Info_File
="${Info_Name}.gz"
386 elif test -r "${Info_Name}.info.gz"; then
387 Info_File
="${Info_Name}.info.gz"
389 echo "$0:$LINENO: can't find info file for ${Info_Name}?">&2
392 echo|
tr -d '\012'>$TMP_FILE1
393 eval $CAT_COMMAND "$Info_File"\
394 |
sed -n -e "/$DIR_SECTION/w $TMP_FILE1"\
395 -e "/$ENTRY_START/,/$ENTRY_END/{
398 }"|
awk "BEGIN{Mode=0}
399 /^$/{if(Mode==1)exit}
400 /^([ ])+([^ ])+/{if(Mode==1)print}
401 /^[^ ]/{if(Mode==1)exit}
402 /${MENU_ITEM}${Info_Name}\)\./{if(Mode==0){Mode++
406 if test ! -s "$TMP_ITEM"; then
407 echo "* $Info_Name: ($Info_Name).">"$TMP_ITEM"
409 Item_Status
=`echo "$Item_Status"|sed -e '1,$s/^./_/'`
410 if test -s "$TMP_FILE1"; then
411 Item_Section
=`sed -e "s/$DIR_SECTION[ ]*//"\
414 Item_Section
=`echo "Miscellaneous"`
416 Size
=`echo "$Item_Section"|wc -l|tr -d ' '`
417 # initialize variables, check for new sections
419 while test "$Num1" -le "$Size"
421 Item
=`echo "$Item_Section"|sed -n -e "${Num1}p"`
422 if Num
=`grep -in "^$Item$" "$TMP_SECTIONS"`; then
423 Num
=`echo "$Num"|sed -e 's/:.*$//g'`
431 Num1
=`expr "$Num1" + "1"`
433 if test "$Interactive"; then
436 echo "add menu item for $Info_File? "
439 echo "$PROMPT1"|
tr -d '\012'
444 if test "$FUNCTIONS"; then
449 "Functions are not loaded.">&2
451 Y
) Interactive
=""; break;;
454 *) echo "\"$Answer\" "\
455 "is an invalid response">&2;;
459 if echo "$Item_Status"|
grep '^X'>/dev
/null
; then
465 Tmp_Var
=`echo "$Item_Status"|tr -d '\012'`
466 Key
=`awk -F':' ' FNR==1{ print $1}' $TMP_ITEM`
467 # add new sections to 'dir' file
468 if test "$Item_Num" -gt "$Item_Dir"; then
469 if test "$Item_Dir" -ne "0"; then
470 sed -e "1,${Item_Dir}d" -e 'i\
472 ' "$TMP_SECTIONS">>"$TMP_MENU"
476 ' "$TMP_SECTIONS">>"$TMP_MENU"
479 # awk determines the insertion points for each section
480 awk -F":" "function Insert(Line){
482 Mode=1;if(substr(\"$Tmp_Var\",Item++,1)==\"X\")
487 /$SECTION_TITLE/{Insert(FNR-1);if(Mode>=1)Mode=2}
488 /${MENU_ITEM}.*\)\./{if(\$1>Item_Name)Insert(FNR-1)}
490 END{Insert(FNR)}" Item_Name
="$Key" "$TMP_MENU"\
491 |
sort -nr|
sed -e "s%\$% r $TMP_ITEM%"|
sed -e '$a\
496 echo "$Item_Status"|
tr -cd "X">>$TMP_COUNT
499 Inserts
=`expr "$Inserts" + "1"`
500 echo "$Info_File installed into section(s):"\
502 echo "$Item_Status"|
awk '/X/{printf(" %d", FNR)}'
506 echo "$Info_File not installed (no section selected)"
511 if test "$Changed"; then
513 Inserts_Total
=`wc -c<"$TMP_COUNT"|tr -d " "`
514 if test "$Inserts" -ne "$Inserts_Total"; then
515 echo "$Inserts $INSERT_MSG"
517 echo "$Inserts_Total $INSERT_MSG2"
521 cat</dev
/null
>"$TMP_SED"
522 comm -23 $TMP_FILE1 $TMP_FILE2>$TMP_LIST
523 for Info_Name
in `cat $TMP_LIST`
525 if test "$Interactive"; then
526 # display invalid menu item(s)
528 /^([ ])+([^ ])+/{if(Mode==2)print}
529 /^$/{if(Mode==2)Mode=1}
530 /$SECTION_TITLE/{Section=\$0}
531 /^[^ ]/{if(Mode==2)Mode=1}
532 /${MENU_ITEM}${Info_Name}\)\./{if(Mode==1){Mode++
535 echo "delete menu item for $Info_Name? "
539 "(y=yes, n=no, Y=yes to all, N=No to all):"\
544 Y
) Interactive
=""; break;;
547 *) echo "\"$Answer\" "\
548 "is an invalid reponse">&2;;
552 # remove menu item from $TMP_MENU
553 Invalid
=`expr "$Invalid" + "1"`
558 "invalid menu item for $Info_Name removed from section(s):"\
560 awk "function Delete(Last){
561 printf(\"%d,%dd\n\",First,Last-1)>>\"$TMP_SED\"}
562 BEGIN{Mode=1;Section=0}
563 /^$/{if(Mode==2){Delete(FNR);Mode=1}}
564 /$SECTION_TITLE/{Section++}
565 /^[^ ]/{if(Mode==2){Delete(FNR);Mode=1}}
566 /${MENU_ITEM}${Info_Name}\)\./{if(Mode==1){
567 First=FNR;printf(\" %d\",Section);Mode=2}}
568 END{if(Mode==2)Delete(FNR+1)}" $TMP_MENU
575 if test "$Changed"; then
576 Invalid_Total
=`wc -l<"$TMP_SED"|tr -d ' '`
578 if test "$Invalid" -ne "$Invalid_Total"; then
579 echo "$Invalid $DELETE_MSG"
581 echo "$Invalid_Total $DELETE_MSG2"
584 if test -z "$Changed"; then
590 # _file: 'update-info.f'_
591 #update-info.f (GNU texinfo @TEXINFO_VERSION@) @UPDATE_INFO_VERSION@
592 #Copyright (C) 1997 Free Software Foundation, Inc.
593 #update-info comes with NO WARRANTY, to the extent permitted by law.
594 #You may redistribute copies of update-info
595 #under the terms of the GNU General Public License.
596 #For more information about these matters, see the files named COPYING."
597 #Author: Richard L. Hawes
599 # update-info.f functions for update-info
601 # ###SECTION 1### functions used to insert missing menu items
613 # ###SECTION 2### functions for menu selection of sections
616 # print a line without a linefeed
617 echo "$*"|
tr -d '\012'
621 # get an answer to question
626 while test -z "$Answer"
635 if expr "$Answer" : "[$_gs_Valid]$">/dev
/null
; then
638 Print
"\"$Answer\" is not a valid response! --">&2
646 # go to previous screen
647 if test "$Previous"; then
650 if Previous
=`expr "$Top_Item" - "$DISPLAY_NUM"`; then
651 if test "$Previous" -le "0"; then
657 elif test "$Next"; then
660 Print
"There is no previous page. ">&2
666 if test "$Next"; then
670 elif test "$Previous"; then
675 Print
"There is no next page. ">&2
680 # process add section command
682 echo "Please enter the name of the new section:"
684 Answer
=`echo "$Answer"\
685 |sed -e 's/^\([ ]\)\{1,\}//g' -e "$MENU_FILTER2"`
686 if test "$Answer"; then
687 Add_Section
"$Answer"
694 if test -z "$Answer"; then
696 Print
"no section added. "
701 # process edit item command
704 cp "$TMP_ITEM" "$TMP_FILE1"
705 while test -z "$_de_Done"
707 eval $EDITOR "$TMP_FILE1"
710 if sed -n -e "$MENU_FILTER1" -e '1p' "$TMP_FILE1"\
711 |
egrep "${MENU_ITEM}${Info_Name}\)\.">/dev
/null
; then
714 sed -n -e '1p' "$TMP_FILE1"
715 echo "Pattern mismatch: `echo\
716 "/${MENU_ITEM}${Info_Name}\
)\.
/"\
721 if sed -n -e '2,$p' "$TMP_FILE1"|
grep '^[^ ]'>&2; then
722 echo "These lines must have leading spaces">&2
726 if test -z "$_de_Done"; then
727 Get_Answer
"yn" "Invalid entry, cancel edits? (y or n):"
728 if test "y" = "$Answer"; then
730 Print
"Canceling edits -- invalid entry ">&2
734 sed -e "$MENU_FILTER1" -e "$MENU_FILTER2" -e '/^$/d'\
735 <"$TMP_FILE1">"$TMP_ITEM"
739 Print
"editor cannot run with error path redirected "
746 if test "$_dn_Num" -ge 1 -a "$_dn_Num" -le "$Item_Num"; then
747 if test `echo "$Item_Status"|sed -n -e "${_dn_Num}p"` = "_"; then
748 Set_Item
"$_dn_Num" "X"
750 Set_Item
"$_dn_Num" "_"
753 Print
"\"$_dn_Num\" is an invalid section number. ">&2
761 Enter the following commands seperated
762 by spaces and terminated by<ENTER>:
763 # : (section number) toggle section
764 a : add a new section
765 e : edit item -- changes will not be
766 accepted if you change the
767 '(info_file_name).' or delete
768 the key parts: '*' 'Menu Name' ':'
769 h : get this help screen
772 q : quit and do not put into menu
773 s : save and put into menu"
774 Print
"Press enter to continue:"
780 # determine value of Next
781 Next
=`expr "$DISPLAY_NUM" + "$Top_Item"`
782 if test "$Next" -gt "$Item_Num"; then
788 # go to last page of menu
789 Top_Item
=`echo|awk "BEGIN{printf(\"%d\",
790 int((${Item_Num}-1)/${DISPLAY_NUM})*${DISPLAY_NUM}+1)}"`
791 if test "$Top_Item" -gt "$DISPLAY_NUM"; then
792 Previous
=`expr "$Top_Item" '-' "$DISPLAY_NUM"`
800 # prompt user for which sections
806 echo "Default sections are selected."
808 while test -z "$Done"
810 awk "FNR==1{printf(\"%s\n\", substr(\$0,1,${COLUMNS}))}" $TMP_ITEM
811 Tmp_Var
=`echo "$Item_Status"|tr -d '\012'`
812 awk "BEGIN{Max=$Top_Item+$DISPLAY_NUM}
813 FNR>=$Top_Item{if(FNR>=Max)exit
814 printf(\"%2d:%s %s\n\",FNR,substr(\"$Tmp_Var\",FNR,1),
815 substr(\$0,1,${COLUMNS}-5))}" "$TMP_SECTIONS"
816 echo "Enter 1-${Item_Num}, add, edit, help,"
817 if test "$Previous" -o "$Next"; then
818 Print
"next, previous, "
821 read Command_List||Command_List
="$CONTROL_D"
822 Command_List
=`echo "$Command_List"\
823 |tr '\011' ' '|tr ' ' '\012'|sed -e "/^$/d"`
825 if test -z "$Command_List"; then
830 while test "$Command_List"
832 Command
=`echo "$Command_List"|sed -n -e '1p'`
833 Command_List
=`echo "$Command_List"|sed -e '1d'`
835 [0-9]|
[0-9][0-9]) Do_Number
"$Command";;
841 s
*) Done
="s"; break;;
843 Item_Status
=`echo "$Item_Status"|sed -e '1,$s/^./_/'`
845 *) Print
"$Command is not a valid command. ">&2
849 if test "$Help"; then
855 # if new sections added, remove unused ones
856 if test "$Item_Num" -gt "$Item_Dir"; then
857 Tmp_Var
=`echo "$Item_Status"|awk "FNR>$Item_Dir{
858 if(\\$0==\"_\")printf(\"%d\n\", FNR)}"`
859 if test "$Tmp_Var"; then
860 Tmp_Var1
=`echo "$Tmp_Var"|sed -e 's/$/d/'`
861 sed -e "$Tmp_Var1" "$TMP_SECTIONS">$TMP_FILE1
862 cp $TMP_FILE1 "$TMP_SECTIONS"
863 Item_Status
=`echo "$Item_Status"|sed -e "$Tmp_Var1"`
866 Item_Num
=`wc -l<"$TMP_SECTIONS"|tr -d ' '`
871 # ###SECTION 100### Constants that redefine
872 PROMPT1
="(y=yes, e=edit, Y=yes to all, n=no, N=No to all):"
875 echo "update-info.f (GNU texinfo @TEXINFO_VERSION@) @UPDATE_INFO_VERSION@"