]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/make_sed.sh
ncurses 6.4 - patch 20230812
[ncurses.git] / man / make_sed.sh
index a0fdb0585822a60726057a6ab1464c8a63fa4de9..2b9ea9f5bc54884326f59557d1f7f669bdf4fc03 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
-# $Id: make_sed.sh,v 1.15 2022/07/16 20:20:00 tom Exp $
+# $Id: make_sed.sh,v 1.17 2023/06/25 18:13:17 tom Exp $
 ##############################################################################
-# Copyright 2020-2021,2022 Thomas E. Dickey                                  #
+# Copyright 2020-2022,2023 Thomas E. Dickey                                  #
 # Copyright 1998-2005,2017 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
@@ -29,7 +29,7 @@
 # authorization.                                                             #
 ##############################################################################
 #
-# Author: Thomas E. Dickey 1997-2005
+# Author: Thomas E. Dickey 1997
 #
 # Construct a sed-script to perform renaming within man-pages.  Originally
 # written in much simpler form, this one accounts for the common cases of
@@ -48,7 +48,7 @@ RESULT=result$$
 rm -f $UPPER $SCRIPT $RESULT
 trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT; exit 1" 1 2 3 15
 trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT" 0
-fgrep -v \# "$1" | \
+${FGREP-grep -F} -v \# "$1" | \
 sed    -e 's/[ ][      ]*/     /g' >$INPUT
 
 for F in 1 2 3 4
@@ -69,9 +69,9 @@ sed   -e 's/^/s\/\\</' \
 echo "# Do the TH lines"
 sed    -e 's/\//\/TH /' \
        -e 's/  / /' \
-       -e 's/  / ""\/TH /' \
+       -e 's/  / \/TH /' \
        -e 's/  / /' \
-       -e 's/\/$/ ""\//' \
+       -e 's/\/$/ \//' \
        $UPPER
 
 echo "# Do the embedded references"