about summary refs log tree commit diff stats
path: root/scripts/cfg_defs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cfg_defs.sh')
-rwxr-xr-xscripts/cfg_defs.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/cfg_defs.sh b/scripts/cfg_defs.sh
index 5f37e962..560dfc41 100755
--- a/scripts/cfg_defs.sh
+++ b/scripts/cfg_defs.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+# $LynxId: cfg_defs.sh,v 1.2 2021/01/07 00:38:05 tom Exp $
 # Translate the lynx_cfg.h and config.cache data into a table, useful for
 # display at runtime.
 
@@ -6,9 +7,10 @@ TOP="${1-.}"
 OUT=cfg_defs.h
 
 # just in case we want to run this outside the makefile
-: ${SHELL:=/bin/sh}
+: "${SHELL:=/bin/sh}"
 
-cat >$OUT <<EOF
+{
+cat <<EOF
 #ifndef CFG_DEFS_H
 #define CFG_DEFS_H 1
 
@@ -23,9 +25,9 @@ sed \
 	-e 's/^.[^=]*_cv_//' \
 	-e 's/=\${.*=/=/'  \
 	-e 's/}$//'          \
-	config.cache | $SHELL $TOP/scripts/cfg_edit.sh >>$OUT
+	config.cache | $SHELL "$TOP/scripts/cfg_edit.sh"
 
-cat >>$OUT <<EOF
+cat <<EOF
 };
 
 static const struct {
@@ -33,16 +35,17 @@ static const struct {
 	const char *value;
 } config_defines[] = {
 EOF
-fgrep	'#define' lynx_cfg.h |
+${FGREP-fgrep}	'#define' lynx_cfg.h |
 sed	-e 's@	@ @g' \
 	-e 's@  @ @g' \
 	-e 's@^[ 	]*#define[ 	]*@@' \
 	-e 's@[ ]*/\*.*\*/@@' \
 	-e 's@[ 	][ 	]*@=@' \
-    | $SHELL $TOP/scripts/cfg_edit.sh >>$OUT
+    | $SHELL "$TOP/scripts/cfg_edit.sh"
 
-cat >>$OUT <<EOF
+cat <<EOF
 };
 
 #endif /* CFG_DEFS_H */
 EOF
+} >$OUT