[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [PATCH 39/50] utils.bbclass: add new wrapper script
From: koen () dominion ! thruhere ! net (Koen Kooi)
Date: 2011-02-27 9:29:51
Message-ID: 5578359e325ebf3b8d6d33a62702cd19d44f67fc.1298798633.git.koen () dominion ! thruhere ! net
[Download RAW message or body]
From: Saul Wold <sgw at linux.intel.com>
Add a new create_cmdline_wrapper() function that takes cmdline options
for commands that need different directories
Related to [BUGID #775
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/classes/utils.bbclass | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 455b49d..e923789 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -271,6 +271,29 @@ oe_machinstall() {
fi
}
+create_cmdline_wrapper () {
+ # Create a wrapper script
+ #
+ # These are useful to work around relocation issues, by setting environment
+ # variables which point to paths in the filesystem.
+ #
+ # Usage: create_wrapper FILENAME [[VAR=VALUE]..]
+
+ cmd=$1
+ shift
+
+ # run echo via env to test syntactic validity of the variable arguments
+ echo "Generating wrapper script for $cmd"
+
+ mv $cmd $cmd.real
+ cmdname=`basename $cmd`.real
+ cat <<END >$cmd
+#!/bin/sh
+exec \`dirname \$0\`/$cmdname "\$@"
+END
+ chmod +x $cmd
+}
+
create_wrapper () {
# Create a wrapper script
#
--
1.6.6.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic