[Lunar-commits] r19159 - in lunar/trunk/var/lib/lunar: compilers functions

Stefan Wold ratler at lunar-linux.org
Wed Mar 8 05:44:34 UTC 2006


Author: ratler
Date: 2006-03-08 05:44:33 +0000 (Wed, 08 Mar 2006)
New Revision: 19159

Modified:
   lunar/trunk/var/lib/lunar/compilers/c++
   lunar/trunk/var/lib/lunar/compilers/cc
   lunar/trunk/var/lib/lunar/compilers/g++
   lunar/trunk/var/lib/lunar/compilers/gcc
   lunar/trunk/var/lib/lunar/compilers/ld
   lunar/trunk/var/lib/lunar/compilers/make
   lunar/trunk/var/lib/lunar/functions/plugins.lunar
Log:
This fixes bug http://bugs.lunar-linux.org/view.php?id=71
In short during prepare install stage of coreutils, plugin and
wrappers expected to find cut and basename which are part of coreutils.

Those tools have been replaced with bash equivalent code.


Modified: lunar/trunk/var/lib/lunar/compilers/c++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/c++	2006-03-08 05:19:33 UTC (rev 19158)
+++ lunar/trunk/var/lib/lunar/compilers/c++	2006-03-08 05:44:33 UTC (rev 19159)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
 
 if [[ -n "$LUNAR_DEBUG" ]] ; then
   echo "++ $CXX_EXT $PROG $CCOPT \"$@\"" >&2

Modified: lunar/trunk/var/lib/lunar/compilers/cc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/cc	2006-03-08 05:19:33 UTC (rev 19158)
+++ lunar/trunk/var/lib/lunar/compilers/cc	2006-03-08 05:44:33 UTC (rev 19159)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
 
 if [[ -n "$LUNAR_DEBUG" ]] ; then
   echo "++ $CC_EXT $PROG $COPT \"$@\"" >&2

Modified: lunar/trunk/var/lib/lunar/compilers/g++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/g++	2006-03-08 05:19:33 UTC (rev 19158)
+++ lunar/trunk/var/lib/lunar/compilers/g++	2006-03-08 05:44:33 UTC (rev 19159)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
 
 if [[ -n "$LUNAR_DEBUG" ]] ; then
   echo "++ $CXX_EXT $PROG $CCOPT \"$@\"" >&2

Modified: lunar/trunk/var/lib/lunar/compilers/gcc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/gcc	2006-03-08 05:19:33 UTC (rev 19158)
+++ lunar/trunk/var/lib/lunar/compilers/gcc	2006-03-08 05:44:33 UTC (rev 19159)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
 
 if [[ -n "$LUNAR_DEBUG" ]] ; then
   echo "++ $CC_EXT $PROG $COPT \"$@\"" >&2

Modified: lunar/trunk/var/lib/lunar/compilers/ld
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/ld	2006-03-08 05:19:33 UTC (rev 19158)
+++ lunar/trunk/var/lib/lunar/compilers/ld	2006-03-08 05:44:33 UTC (rev 19159)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
 
 if [[ -n "$LUNAR_DEBUG" ]] ; then
 	echo "++ $PROG \"$@\"" >&2

Modified: lunar/trunk/var/lib/lunar/compilers/make
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/make	2006-03-08 05:19:33 UTC (rev 19158)
+++ lunar/trunk/var/lib/lunar/compilers/make	2006-03-08 05:44:33 UTC (rev 19159)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p $(basename $0))
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
 
 if [[ -n "$LUNAR_DEBUG" ]] ; then
 	echo "++ $MAKE_EXT $PROG ${MAKES:+-j$MAKES} \"$@\"" >&2

Modified: lunar/trunk/var/lib/lunar/functions/plugins.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/plugins.lunar	2006-03-08 05:19:33 UTC (rev 19158)
+++ lunar/trunk/var/lib/lunar/functions/plugins.lunar	2006-03-08 05:44:33 UTC (rev 19159)
@@ -51,8 +51,8 @@
 	REQUESTED_TYPE=$1
 	shift
 	for ((COUNT=0; COUNT < $LUNAR_PLUGIN_COUNT; COUNT++)); do
-		THIS_TYPE=$(echo ${LUNAR_PLUGINS[$COUNT]} | cut -d: -f1)
-		THIS_HANDLER=$(echo ${LUNAR_PLUGINS[$COUNT]} | cut -d: -f2-)
+		THIS_TYPE=${LUNAR_PLUGINS[$COUNT]%%:*}
+		THIS_HANDLER=${LUNAR_PLUGINS[$COUNT]#*:}
 		if [ "$REQUESTED_TYPE" == "$THIS_TYPE" ]; then
 			# we have identified a valid plugin for this type
 			$THIS_HANDLER $@



More information about the Lunar-commits mailing list