[v2,6/6] SDK: allow toolchain installation from another directory

Submitted by Laurentiu Palcu on Sept. 20, 2012, 1:48 p.m.


Message ID c8246ddf0b655c78db754468ef22fe288b51a887.1348148406.git.laurentiu.palcu@intel.com
State New
Headers show

Commit Message

Laurentiu Palcu Sept. 20, 2012, 1:48 p.m.
This patch will allow one to run the installer from another directory
than the one where it's actually located.

Suppose the installer is in /home/user/test/my/sdk and the current
directory is in a different place. With this patch, one can run the
installer like this:

$ sh ~/test/my/sdk/poky-eglibc-x86_64-arm-toolchain-gmae-1.2+snapshot-20120920.sh

[YOCTO #3135]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
 meta/classes/populate_sdk_base.bbclass |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 52bae53..9f51562 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -150,10 +150,10 @@  if [ $? -ne 0 ]; then
 	exit 1
-payload_offset=$(($(grep -na -m1 "^MARKER:$" $(basename $0)|cut -d':' -f1) + 1))
+payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
 echo -n "Extracting SDK..."
-tail -n +$payload_offset $(basename $0) | tar xj --strip-components=4 -C $target_sdk_dir
+tail -n +$payload_offset $0| tar xj --strip-components=4 -C $target_sdk_dir
 echo "done"
 echo -n "Setting it up..."