Skip to contentSkip to conversation

toolchain-shar-template.sh: fix the text files in the top dir

PATCH New Robert Yang 1 participant 2 messages Nov 13, 2014

lore
Share & tools
lore
#0 lore raw

cover toolchain-shar-template.sh: fix the text files in the top dir

The following changes since commit e7b731a1a358e0007dba1038ad504888bec5916e:

docbook-xsl-stylesheets: fix do_configure typo (2014-11-12 15:36:14 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/sdk
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/sdk

Robert Yang (1):
toolchain-shar-template.sh: fix the text files in the top dir

 meta/files/toolchain-shar-template.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 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.

---
 meta/files/toolchain-shar-template.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/files/toolchain-shar-template.sh +6 -1
index 2578a34..0d679a6 100644
@@ -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
Signature · 1 line
1.7.9.5