summaryrefslogtreecommitdiffstats
path: root/meta/files/toolchain-shar-extract.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/files/toolchain-shar-extract.sh')
-rw-r--r--meta/files/toolchain-shar-extract.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 89d30005fd..29c52e3b13 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -1,6 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3export LC_ALL=en_US.UTF-8 3export LC_ALL=en_US.UTF-8
4
5# The pipefail option is now part of POSIX (POSIX.1-2024) and available in more
6# and more shells. Enable it if available to make the SDK installer more robust.
7(set -o pipefail 2> /dev/null) && set -o pipefail
8
4#Make sure at least one python is installed 9#Make sure at least one python is installed
5INIT_PYTHON=$(which python3 2>/dev/null ) 10INIT_PYTHON=$(which python3 2>/dev/null )
6[ -z "$INIT_PYTHON" ] && INIT_PYTHON=$(which python2 2>/dev/null) 11[ -z "$INIT_PYTHON" ] && INIT_PYTHON=$(which python2 2>/dev/null)
@@ -286,6 +291,10 @@ post_relocate="$target_sdk_dir/post-relocate-setup.sh"
286if [ -e "$post_relocate" ]; then 291if [ -e "$post_relocate" ]; then
287 $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate 292 $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate
288 $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@" 293 $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
294 if [ $? -ne 0 ]; then
295 echo "Executing $post_relocate failed"
296 exit 1
297 fi
289 $SUDO_EXEC rm -f $post_relocate 298 $SUDO_EXEC rm -f $post_relocate
290fi 299fi
291 300