]> code.ossystems Code Review - openembedded-core.git/commitdiff
toolchain-shar-template.sh: fix the text files in the top dir
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 13 Nov 2014 14:34:18 +0000 (06:34 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Dec 2014 10:17:24 +0000 (10:17 +0000)
It only fixed the text files in native_sysroot, but there might be some
files in the top installed dir (whose var name is target_sdk_dir in the
code) which are also needed to be fixed.

It used "find $native_sysroot", now also "find $target_sdk_dir -maxdepth 1",
and split the long line into small ones.

(From OE-Core rev: 104990923f82d129a0fc8e6cd5bf0224751d5d03)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/files/toolchain-shar-template.sh

index 2578a34a2d9d97c15069c145fb9d2e6d5b1d6b07..0d679a66dbcfa963841eb4ec8e502ad6d1849538 100644 (file)
@@ -154,7 +154,12 @@ if [ $relocate = 1 ] ; then
 fi
 
 # replace @SDKPATH@ with the new prefix in all text files: configs/scripts/etc
-$SUDO_EXEC find $native_sysroot -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\|source\).*text"|awk -F':' '{printf "\"%s\"\n", $1}'|$SUDO_EXEC xargs -n32 sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
+for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
+       $SUDO_EXEC find $replace -type f -exec file '{}' \; | \
+               grep ":.*\(ASCII\|script\|source\).*text" | \
+               awk -F':' '{printf "\"%s\"\n", $1}' | \
+               $SUDO_EXEC xargs -n32 sed -i -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g"
+done
 
 # change all symlinks pointing to @SDKPATH@
 for l in $($SUDO_EXEC find $native_sysroot -type l); do