summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/utils.bbclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index b617632d9f..b58c22771f 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -188,7 +188,7 @@ create_cmdline_shebang_wrapper () {
188 # Create a wrapper script where commandline options are needed 188 # Create a wrapper script where commandline options are needed
189 # 189 #
190 # These are useful to work around shebang relocation issues, where shebangs are too 190 # These are useful to work around shebang relocation issues, where shebangs are too
191 # long or have arguments in them, thus preventing them from using the /usr/bin/env 191 # long or have arguments in them, thus preventing them from using the /usr/bin/env
192 # shebang 192 # shebang
193 # 193 #
194 # Usage: create_cmdline_wrapper FILENAME <extra-options> 194 # Usage: create_cmdline_wrapper FILENAME <extra-options>
@@ -198,10 +198,10 @@ create_cmdline_shebang_wrapper () {
198 198
199 echo "Generating wrapper script for $cmd" 199 echo "Generating wrapper script for $cmd"
200 200
201 # Strip #! and get remaining interpreter + arg 201 # Strip #! and get remaining interpreter + arg
202 argument="$(basename "$(head -n1 $cmd | sed -e 's|#![ ]*||g' )")" 202 argument="$(sed -ne 's/^#! *//p;q' $cmd)"
203 # strip the shebang from the real script as we do not want it to be usable anyway 203 # strip the shebang from the real script as we do not want it to be usable anyway
204 tail -n +2 $cmd > $cmd.real 204 tail -n +2 $cmd > $cmd.real
205 cmdname=$(basename $cmd) 205 cmdname=$(basename $cmd)
206 dirname=$(dirname $cmd) 206 dirname=$(dirname $cmd)
207 cmdoptions=$@ 207 cmdoptions=$@