public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix PR 5215
@ 2007-10-26  6:40 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2007-10-26  6:40 UTC (permalink / raw)
  To: binutils

Hides sh unfriendly bash syntax in another file.

	PR 5215
	* genscripts.sh: Move bash script to..
	* genscrba.sh: ..here.

Index: ld/genscripts.sh
===================================================================
RCS file: /cvs/src/src/ld/genscripts.sh,v
retrieving revision 1.26
diff -u -p -r1.26 genscripts.sh
--- ld/genscripts.sh	1 Oct 2007 09:54:57 -0000	1.26
+++ ld/genscripts.sh	26 Oct 2007 05:07:26 -0000
@@ -402,19 +402,7 @@ case " $EMULATION_LIBPATH " in
 esac
 
 if test -n "${BASH+set}"; then
-  source_em()
-  {
-    local current_script="$em_script"
-    em_script=$1
-    . $em_script
-    em_script=$current_script
-  }
-  fragment()
-  {
-    local lineno=$[${BASH_LINENO[0]} + 1]
-    echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
-    cat >> e${EMULATION_NAME}.c
-  }
+  . ${srcdir}/genscrba.sh
 else
   source_em()
   {
Index: ld/genscrba.sh
===================================================================
RCS file: ld/genscrba.sh
diff -N ld/genscrba.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld/genscrba.sh	26 Oct 2007 06:19:06 -0000
@@ -0,0 +1,14 @@
+#!/bin/bash
+source_em()
+{
+  local current_script="$em_script"
+  em_script=$1
+  . $em_script
+  em_script=$current_script
+}
+fragment()
+{
+  local lineno=$[${BASH_LINENO[0]} + 1]
+  echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
+  cat >> e${EMULATION_NAME}.c
+}

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-26  6:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-26  6:40 Fix PR 5215 Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).