summaryrefslogtreecommitdiffstats
path: root/meta/files/toolchain-shar-template.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/files/toolchain-shar-template.sh')
-rw-r--r--meta/files/toolchain-shar-template.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/files/toolchain-shar-template.sh b/meta/files/toolchain-shar-template.sh
index 02035d4539..2578a34a2d 100644
--- a/meta/files/toolchain-shar-template.sh
+++ b/meta/files/toolchain-shar-template.sh
@@ -132,7 +132,8 @@ if [ "$dl_path" = "" ] ; then
132 echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!" 132 echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
133 exit 1 133 exit 1
134fi 134fi
135executable_files=$($SUDO_EXEC find $native_sysroot -type f -perm /111 -printf "'%h/%f' ") 135executable_files=$($SUDO_EXEC find $native_sysroot -type f \
136 \( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ")
136 137
137tdir=`mktemp -d` 138tdir=`mktemp -d`
138if [ x$tdir = x ] ; then 139if [ x$tdir = x ] ; then
@@ -162,7 +163,7 @@ done
162 163
163# find out all perl scripts in $native_sysroot and modify them replacing the 164# find out all perl scripts in $native_sysroot and modify them replacing the
164# host perl with SDK perl. 165# host perl with SDK perl.
165for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep "^#!.*perl" -l '{}' \;); do 166for perl_script in $($SUDO_EXEC find $native_sysroot -type f -exec grep -l "^#!.*perl" '{}' \;); do
166 $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \ 167 $SUDO_EXEC sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
167 "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script 168 "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
168done 169done