aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/common/include-apps-fetch-install-sdk.sh
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2017-05-23 14:39:21 +0200
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2017-05-23 14:39:21 +0200
commite5fb35eb200e3476297ba3f0465775a05fb86e86 (patch)
tree24a37258f0e169c9b9ff973d3e49bc0ace50cf61 /jjb/common/include-apps-fetch-install-sdk.sh
parent4e4dcbc9464ab69208f528284afff50f10118d2d (diff)
Add initial job template for application builds within jenkins
This adds the necessary plumbing to build applications for the 3-4 different target architectures for applications within jenkins as CI builds. Change-Id: I263c3ba25fa6dbea78d305ff453cca1106724316 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'jjb/common/include-apps-fetch-install-sdk.sh')
-rw-r--r--jjb/common/include-apps-fetch-install-sdk.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/jjb/common/include-apps-fetch-install-sdk.sh b/jjb/common/include-apps-fetch-install-sdk.sh
new file mode 100644
index 00000000..436c3843
--- /dev/null
+++ b/jjb/common/include-apps-fetch-install-sdk.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+# (c) 2017 Jan-Simon Moeller dl9pf(at)gmx.de
+# License GPLv2
+#
+# debugging purposes
+set -e
+
+SDKHOSTDIR="~/agl-sdk"
+
+################################################################################
+## apps-fetch-install-sdk.sh
+################################################################################
+
+SDKBASEURL="https://download.automotivelinux.org/AGL/snapshots/master/latest/${TARGETSDKMACHINE}/deploy/sdk/"
+export TARGETSDKNAME=$(curl -s "$SDKBASEURL" | grep -e "crosssdk.*\.sh<" | sed -e "s#.*<a href=\"##g" -e "s#\">poky-agl.*##g")
+
+if test x"" = x"${TARGETSDKNAME}" ; then
+ echo "Could not retrieve TARGETSDKNAME from download.automotivelinux.org"
+ echo "Abort."
+ exit 1
+fi
+
+if test ! -f ${TARGETSDKNAME} ; then
+ echo "Downloading $TARGETSDKNAME for $MACHINE"
+ wget -nd -c "${SDKBASEURL}/${TARGETSDKNAME}"
+fi
+
+chmod a+x ${TARGETSDKNAME}
+
+eval export TARGETSDKENVSCRIPT="${SDKHOSTDIR}/environment-setup-${TARGETSDKARCH}-agl-linux-gnueabi"
+
+if test ! -f ${TARGETSDKENVSCRIPT} ; then
+ bash ${TARGETSDKNAME} -d ${SDKHOSTDIR}/ -y
+fi
+if test ! -f ${TARGETSDKENVSCRIPT} ; then
+ echo "Script not there after extracting sdk ?!"
+ echo "Abort."
+ exit 1
+fi
+
+source "${TARGETSDKENVSCRIPT}"
+
+ls -alh ~/
+
+ls
+
+ls -alh
+
+set \ No newline at end of file