[oe-commits] Robert Yang : toolchain-shar-template.sh: fix the text files in the top dir
git at git.openembedded.org
git at git.openembedded.org
Thu Nov 20 14:08:57 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 104990923f82d129a0fc8e6cd5bf0224751d5d03
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=104990923f82d129a0fc8e6cd5bf0224751d5d03
Author: Robert Yang <liezhi.yang at windriver.com>
Date: Thu Nov 13 06:34:18 2014 -0800
toolchain-shar-template.sh: fix the text files in the top dir
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.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/files/toolchain-shar-template.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/files/toolchain-shar-template.sh b/meta/files/toolchain-shar-template.sh
index 2578a34..0d679a6 100644
--- a/meta/files/toolchain-shar-template.sh
+++ b/meta/files/toolchain-shar-template.sh
@@ -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
More information about the Openembedded-commits
mailing list