]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta: toolchain-shar-relocate.sh: Fix for extracting SDK in the same directory as...
authorZawadzki, Krzysztof (Nokia - PL/Wroclaw) <krzysztof.zawadzki@nokia.com>
Tue, 8 Mar 2016 19:53:28 +0000 (19:53 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Mar 2016 16:50:28 +0000 (16:50 +0000)
If SDK will be extracted in the same folder as sdk shar script.
The shar_relocate will substitute SDK.sh script SDKPATH with extract destination path.
After that operation no one will be able use this sdk script as paths in it will be different.
To fix this we need to filter out sdk script and relocate_sdk scripts from  SDKPATH substitution

Signed-off-by: Krzysztof Zawadzki <krzysztof.zawadzki@nokia.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/files/toolchain-shar-relocate.sh

index 4f34fb4bfb90eb7e989506a7394f610ba42e0960..d4bcf0e55d2f92799afa66400b457ca6ad66559f 100644 (file)
@@ -47,7 +47,7 @@ for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
        $SUDO_EXEC find $replace -type f
 done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
     awk -F':' '{printf "\"%s\"\n", $1}' | \
-    grep -v "$target_sdk_dir/environment-setup-*" | \
+    grep -Ev "$target_sdk_dir/(environment-setup-*|relocate_sdk*|${0##*/})" | \
     xargs -n100 $SUDO_EXEC sed -i \
         -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" \
         -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \