Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] toolchain-shar-relocate.sh: check for environment-setup beforehand
@ 2020-06-17 20:47 Awais Belal
  2020-06-18  7:50 ` [OE-core] " Paul Barker
  0 siblings, 1 reply; 6+ messages in thread
From: Awais Belal @ 2020-06-17 20:47 UTC (permalink / raw)
  To: openembedded-core

The script runs a 'cat' on the script and if it isn't present in the
sdk the cat command waits on the std input and hence the installation
process simply sits there.

Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
 meta/files/toolchain-shar-relocate.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh
index e3c10018ef..02a05664c6 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -3,6 +3,12 @@ if ! xargs --version > /dev/null 2>&1; then
 	exit 1
 fi
 
+# check if we have a valid env-setup script
+if [ ! -f "$env_setup_script" ]; then
+	echo "Main environment-setup file not found. Abort!"
+	exit 1
+fi
+
 # fix dynamic loader paths in all ELF SDK binaries
 native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
 dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-18 11:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-17 20:47 [PATCH] toolchain-shar-relocate.sh: check for environment-setup beforehand Awais Belal
2020-06-18  7:50 ` [OE-core] " Paul Barker
2020-06-18  8:04   ` Mikko Rapeli
2020-06-18 10:13     ` Awais Belal
2020-06-18 11:28       ` Mikko Rapeli
2020-06-18 10:09   ` Awais Belal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox