]> granicus.if.org Git - postgresql/commitdiff
Fix quoting problems in mkMakefile.tcldefs.sh.in and
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 29 Aug 1999 20:09:44 +0000 (20:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 29 Aug 1999 20:09:44 +0000 (20:09 +0000)
mkMakefile.tkdefs.sh.in.

src/bin/pgtclsh/mkMakefile.tcldefs.sh.in
src/bin/pgtclsh/mkMakefile.tkdefs.sh.in
src/pl/tcl/mkMakefile.tcldefs.sh.in

index a8c2cc374de976b3c5b8836fcb20c16f1508a066..79e456b3b54cc1ffd252bbb649d4648d10149a9b 100644 (file)
@@ -1,16 +1,23 @@
+#! /bin/sh
 
-if [ ! -f @TCL_CONFIG_SH@ ]; then
+if [ ! -r @TCL_CONFIG_SH@ ]; then
     echo "@TCL_CONFIG_SH@ not found"
     echo "I need this file! Please make a symbolic link to this file"
     echo "and start make again."
     exit 1
 fi
 
+# Source the file to obtain the correctly expanded variable definitions
+. @TCL_CONFIG_SH@
+
+# Read the file a second time as an easy way of getting the list of variable
+# definitions to output.
 cat @TCL_CONFIG_SH@ |
-    egrep '^TCL_' |
-    while read inp
+    egrep '^TCL_|^TK_' |
+    sed 's/^\([^=]*\)=.*$/\1/' |
+    while read var
     do
-           eval eval echo $inp
+       eval echo "\"$var = \$$var\""
     done >Makefile.tcldefs
 
 exit 0
index 3b5fd2402f49e8195e795282ca039f80fa43d870..b739547f7933018227e12c01311a7dda5e5f5853 100644 (file)
@@ -1,18 +1,23 @@
+#! /bin/sh
 
-if [ ! -f @TK_CONFIG_SH@ ]; then
+if [ ! -r @TK_CONFIG_SH@ ]; then
     echo "@TK_CONFIG_SH@ not found"
     echo "I need this file! Please make a symbolic link to this file"
     echo "and start make again."
     exit 1
 fi
 
+# Source the file to obtain the correctly expanded variable definitions
 . @TK_CONFIG_SH@
 
+# Read the file a second time as an easy way of getting the list of variable
+# definitions to output.
 cat @TK_CONFIG_SH@ |
-    egrep '^TK_' |
-    while read inp
+    egrep '^TCL_|^TK_' |
+    sed 's/^\([^=]*\)=.*$/\1/' |
+    while read var
     do
-           eval eval echo $inp
+       eval echo "\"$var = \$$var\""
     done >Makefile.tkdefs
 
 exit 0
index ea86a233371bf5b1ebf1b0518e36ebf6cd06a017..79e456b3b54cc1ffd252bbb649d4648d10149a9b 100644 (file)
@@ -1,16 +1,23 @@
+#! /bin/sh
 
-if [ ! -f @TCL_CONFIG_SH@ ]; then
+if [ ! -r @TCL_CONFIG_SH@ ]; then
     echo "@TCL_CONFIG_SH@ not found"
     echo "I need this file! Please make a symbolic link to this file"
     echo "and start make again."
     exit 1
 fi
 
+# Source the file to obtain the correctly expanded variable definitions
+. @TCL_CONFIG_SH@
+
+# Read the file a second time as an easy way of getting the list of variable
+# definitions to output.
 cat @TCL_CONFIG_SH@ |
     egrep '^TCL_|^TK_' |
-    while read inp
+    sed 's/^\([^=]*\)=.*$/\1/' |
+    while read var
     do
-           eval eval echo $inp
+       eval echo "\"$var = \$$var\""
     done >Makefile.tcldefs
 
 exit 0