Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit cf9fe2f

Browse files
eriknyquistcalvinatintel
authored andcommitted
MAKER-573: install_script.sh; use 'find' portably
"-perm +mode" is deprecated; newer versions of 'find' use "-perm /mode". Try both, go with the one that works.
1 parent e0732d6 commit cf9fe2f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

x86/bin/install_script.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
FIND_OPTS="+111 /111"
34
INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
45
SDK_ARCH=$(echo i586 | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
56

@@ -107,8 +108,12 @@ if [ "$dl_path" = "" ] ; then
107108
echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"
108109
exit 1
109110
fi
110-
#executable_files="'"$($SUDO_EXEC find "$native_sysroot" -type f -perm +111)"'"
111-
executable_files=$($SUDO_EXEC find "$native_sysroot" -type f -perm +111 -exec printf "\"%s\" " {} \; )
111+
112+
for opt in $FIND_OPTS
113+
do
114+
executable_files=$($SUDO_EXEC find "$native_sysroot" -type f -perm "$opt" -exec printf "\"%s\" " {} \;)
115+
[ $? -eq 0 ] && break
116+
done
112117

113118
tdir=`mktemp -d`
114119
if [ x$tdir = x ] ; then

0 commit comments

Comments
 (0)