summaryrefslogtreecommitdiffstats
path: root/meta/files/toolchain-shar-extract.sh
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-02-12 10:52:07 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-15 13:24:10 +0000
commit93ec145f421a45077b40ae99ee6a96bc11f91f18 (patch)
treeb620ba6f358ef7c11d71fc1199b5b70a427bffee /meta/files/toolchain-shar-extract.sh
parent0a5bbad5810b69fa09dbd8d886e4f368310a5db9 (diff)
downloadopenembedded-core-93ec145f421a45077b40ae99ee6a96bc11f91f18.tar.gz
toolchain-shar-extract: Add post-relocate scripts
Recipes can now install post-relocation scripts which will be run when the SDK is installed. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files/toolchain-shar-extract.sh')
-rw-r--r--meta/files/toolchain-shar-extract.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 91804ec281..f7ab43066f 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -259,6 +259,14 @@ if [ $savescripts = 0 ] ; then
$SUDO_EXEC rm -f ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh
fi
+# Execute post-relocation script
+post_relocate="$target_sdk_dir/post-relocate-setup.sh"
+if [ -e "$post_relocate" ]; then
+ $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate
+ $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
+ $SUDO_EXEC rm -f $post_relocate
+fi
+
echo "SDK has been successfully set up and is ready to be used."
echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g."
for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do