[git commit master 1/1] prettify shell helpers

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Sun Nov 21 00:23:16 UTC 2010


commit: http://git.uclibc.org/uClibc++/commit/?id=bf93693af1428dce7b887f938f6b797f3eb77adf
branch: http://git.uclibc.org/uClibc++/commit/?id=refs/heads/master

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 bin/Makefile                 |   18 +++++++++---------
 scripts/find_libgcc_eh.sh    |    2 +-
 scripts/find_libsupc.sh      |    2 +-
 tests/testoutput/runtests.sh |    8 +++-----
 4 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/bin/Makefile b/bin/Makefile
index c45c8c5..db95c50 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -13,14 +13,14 @@ install:
 	$(INSTALL) -m 755 $(WRAPPER) $(PREFIX)$(UCLIBCXX_RUNTIME_BINDIR)
 
 $(WRAPPER):
-	echo "#!/bin/bash" > $(WRAPPER)
-	echo "" >> $(WRAPPER)
+	echo '#!/bin/sh' > $(WRAPPER)
+	echo '' >> $(WRAPPER)
 	echo 'WRAPPER_INCLUDEDIR="$${WRAPPER_INCLUDEDIR:=-I$(UCLIBCXX_RUNTIME_INCLUDEDIR)}"' >> $(WRAPPER)
 	echo 'WRAPPER_LIBDIR="$${WRAPPER_LIBDIR:=-L$(UCLIBCXX_RUNTIME_LIBDIR)}"' >> $(WRAPPER)
-	echo "" >> $(WRAPPER)
+	echo '' >> $(WRAPPER)
 	echo 'WRAPPER_OPTIONS=""' >> $(WRAPPER)
-	echo "WRAPPER_LIBS=\"$(LIBS)\"" >> $(WRAPPER)
-	echo "" >> $(WRAPPER)
+	echo 'WRAPPER_LIBS="$(LIBS)"' >> $(WRAPPER)
+	echo '' >> $(WRAPPER)
 	echo 'WRAPPER_INCLIB="Y"' >> $(WRAPPER)
 	echo 'while [ -n "$$1" ]' >> $(WRAPPER)
 	echo 'do' >> $(WRAPPER)
@@ -30,18 +30,18 @@ $(WRAPPER):
 	echo '		WRAPPER_INCLIB="N"' >> $(WRAPPER)
 	echo '	fi' >> $(WRAPPER)
 ifneq ($(strip $(LIBS)),$(strip $(STATIC_LIBS)))
-	echo '	if [ "$$1" == "-static" ]' >> $(WRAPPER)
+	echo '	if [ "$$1" = "-static" ]' >> $(WRAPPER)
 	echo '	then' >> $(WRAPPER)
-	echo "		WRAPPER_LIBS=\"$(STATIC_LIBS)\"" >> $(WRAPPER)
+	echo '		WRAPPER_LIBS="$(STATIC_LIBS)"' >> $(WRAPPER)
 	echo '	fi' >> $(WRAPPER)
 endif
 	echo '	shift' >> $(WRAPPER)
 	echo 'done' >> $(WRAPPER)
-	echo 'if [ "$$WRAPPER_INCLIB" == "Y" ]' >> $(WRAPPER)
+	echo 'if [ "$$WRAPPER_INCLIB" = "Y" ]' >> $(WRAPPER)
 	echo 'then' >> $(WRAPPER)
 	echo '	WRAPPER_OPTIONS="$$WRAPPER_OPTIONS -nodefaultlibs $$WRAPPER_LIBDIR -l$(LNAME) $$WRAPPER_LIBS"' >> $(WRAPPER)
 	echo 'fi' >> $(WRAPPER)
-	echo "" >> $(WRAPPER)
+	echo '' >> $(WRAPPER)
 ifeq ($(DODEBUG),y)
 	echo 'echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$WRAPPER_OPTIONS' >> $(WRAPPER)
 endif
diff --git a/scripts/find_libgcc_eh.sh b/scripts/find_libgcc_eh.sh
index 6457604..b70868c 100755
--- a/scripts/find_libgcc_eh.sh
+++ b/scripts/find_libgcc_eh.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #This purpose of this file is to return the filename for libgcc_eh to be used.  We use the script so that it
 #can be easily replaced by system developers and cross-compilers so that the user doesn't require an installed
diff --git a/scripts/find_libsupc.sh b/scripts/find_libsupc.sh
index 32bd522..107443f 100755
--- a/scripts/find_libsupc.sh
+++ b/scripts/find_libsupc.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #This purpose of this file is to return the filename for libsupc++.a to be used.  We use the script so that it
 #can be easily replaced by system developers and cross-compilers so that the user doesn't require an installed
diff --git a/tests/testoutput/runtests.sh b/tests/testoutput/runtests.sh
index c1eeb40..c6b388d 100755
--- a/tests/testoutput/runtests.sh
+++ b/tests/testoutput/runtests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 RETURNVALUE=0
 
@@ -11,8 +11,7 @@ for x in *.good ; do
 			LD_LIBRARY_PATH="../../src" ../${TEST} > ${TEST}.test
 		fi
 		cmp ${TEST}.good ${TEST}.test
-		if [ "$?" -eq "1" ]
-		then
+		if [ $? -eq 1 ] ; then
 			printf "%-25sFAILED\n" ${TEST}
 			RETURNVALUE=1
 		else
@@ -33,8 +32,7 @@ if [ "$1" = "DODEBUG" ] ; then
 			../${TEST}-old > ${TEST}-old.test
 		fi
 		cmp ${TEST}.good ${TEST}-old.test
-		if [ "$?" -eq "1" ]
-		then
+		if [ $? -eq 1 ] ; then
 			printf "%-25sFAILED\n" ${TEST}-old
 			RETURNVALUE=1
 		else
-- 
1.7.2.2



More information about the uClibc-cvs mailing list