summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-04-29 21:01:34 +0000
committerRichard Purdie <richard@openedhand.com>2008-04-29 21:01:34 +0000
commitda27611bc9c8506b9411ce9968f71bd229ca0654 (patch)
tree4318cc51f6a80d489e8cadd848ea949d4677652c /scripts
parent5d5fab77cf9616bf62023c202b38f309f8bbf189 (diff)
downloadpoky-da27611bc9c8506b9411ce9968f71bd229ca0654.tar.gz
poky-autobuild: Attempt to clean up scripts slightly
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4371 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-autobuild27
-rwxr-xr-xscripts/poky-autobuild-postprocess47
2 files changed, 43 insertions, 31 deletions
diff --git a/scripts/poky-autobuild b/scripts/poky-autobuild
index 752e0a7bb0..d283b668d3 100755
--- a/scripts/poky-autobuild
+++ b/scripts/poky-autobuild
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# Poky Build Enviroment Setup Script 3# Poky Automated Build Server Enviroment Setup Script
4# 4#
5# Copyright (C) 2006-2007 OpenedHand Ltd. 5# Copyright (C) 2006-2007 OpenedHand Ltd.
6# 6#
@@ -18,11 +18,17 @@
18# along with this program; if not, write to the Free Software 18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 20
21 21TARGETDIR=/srv/poky/autobuild-output
22#if test x"$0" = x"./poky-init-build-env"; then 22CURRDIR=`pwd`
23# echo "Error: Run via '. ./poky-init-build-env'" 23if [ "$CURRDIR" = "/srv/poky/autobuild/full-shihtzu/build" ]; then
24# exit 1 24 ABTARGET="poky"
25#fi 25elif [ "$CURRDIR" = "/srv/poky/autobuild/full-bleeding-shihtzu/build" ]; then
26 ABTARGET="poky-bleeding"
27elif [ "$CURRDIR" = "/srv/poky/autobuild/toolchain-shihtzu/build" ]; then
28 ABTARGET="toolchain"
29elif [ "$CURRDIR" = "/srv/poky/autobuild/incremental-shihtzu/build" ]; then
30 ABTARGET="incremental"
31fi
26 32
27if [ "xpreamble" = "x$1" ]; then 33if [ "xpreamble" = "x$1" ]; then
28 mkdir -p ./build/tmp/deploy/images 34 mkdir -p ./build/tmp/deploy/images
@@ -38,9 +44,9 @@ POSTPROCESS=`which poky-autobuild-postprocess`
38if [ "xcomplete" = "x$1" ]; then 44if [ "xcomplete" = "x$1" ]; then
39 touch ./tmp/deploy/images/images-complete 45 touch ./tmp/deploy/images/images-complete
40 chmod a+w ./tmp/deploy/images/images-complete 46 chmod a+w ./tmp/deploy/images/images-complete
41 cd ..
42 if [ "x$POSTPROCESS" != "x" ]; then 47 if [ "x$POSTPROCESS" != "x" ]; then
43 $POSTPROCESS `pwd` 48 cd ..
49 $POSTPROCESS $ABTARGET $TARGETDIR
44 fi 50 fi
45 exit 0 51 exit 0
46fi 52fi
@@ -59,9 +65,8 @@ fi
59 65
60bitbake $@ 66bitbake $@
61 67
62cd ..
63
64if [ "x$POSTPROCESS" != "x" ]; then 68if [ "x$POSTPROCESS" != "x" ]; then
65 $POSTPROCESS `pwd` 69 cd ..
70 $POSTPROCESS $ABTARGET $TARGETDIR
66fi 71fi
67 72
diff --git a/scripts/poky-autobuild-postprocess b/scripts/poky-autobuild-postprocess
index d9ba72d14d..8262204268 100755
--- a/scripts/poky-autobuild-postprocess
+++ b/scripts/poky-autobuild-postprocess
@@ -1,30 +1,37 @@
1#!/bin/sh 1#!/bin/sh
2 2
3TARGETDIR=/srv/poky/autobuild-output 3# Poky Automated Build Server Post Processing Script
4if [ "$1" = "/srv/poky/autobuild/full-shihtzu/build" ]; then 4#
5 DISTRO="poky" 5# Copyright (C) 2006-2007 OpenedHand Ltd.
6fi 6#
7if [ "$1" = "/srv/poky/autobuild/full-bleeding-shihtzu/build" ]; then 7# This program is free software; you can redistribute it and/or modify
8 DISTRO="poky-bleeding" 8# it under the terms of the GNU General Public License as published by
9fi 9# the Free Software Foundation; either version 2 of the License, or
10if [ "$1" = "/srv/poky/autobuild/toolchain-shihtzu/build" ]; then 10# (at your option) any later version.
11 DISTRO="toolchain" 11#
12fi 12# This program is distributed in the hope that it will be useful,
13if [ "$1" = "/srv/poky/autobuild/incremental-shihtzu/build" ]; then 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14 DISTRO="incremental" 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15fi 15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
21ABTARGET=$1
22TARGETDIR=$2
16 23
17cd $1/build/tmp/deploy/ 24cd ./build/tmp/deploy/
18 25
19LASTREV=`tail images/svninfo | grep Revision | cut -f 2 -d ' '` 26LASTREV=`tail images/svninfo | grep Revision | cut -f 2 -d ' '`
20DEST=$TARGETDIR/$DISTRO/$LASTREV/ 27DEST=$TARGETDIR/$ABTARGET/$LASTREV/
21 28
22mkdir -p $DEST 29mkdir -p $DEST
23 30
24COMPRESS_FILES=() 31COMPRESS_FILES=()
25FILES=() 32FILES=()
26 33
27if [ "x$DISTRO" = "xpoky-bleeding" ]; then 34if [ "x$ABTARGET" = "xpoky-bleeding" ]; then
28 COMPRESS_FILES=( 35 COMPRESS_FILES=(
29 poky-image-sato-qemuarm-*.rootfs.ext2 36 poky-image-sato-qemuarm-*.rootfs.ext2
30 ) 37 )
@@ -39,14 +46,14 @@ if [ "x$DISTRO" = "xpoky-bleeding" ]; then
39 ) 46 )
40fi 47fi
41 48
42if [ "x$DISTRO" = "xtoolchain" ]; then 49if [ "x$ABTARGET" = "xtoolchain" ]; then
43 FILES=( 50 FILES=(
44 svninfo 51 svninfo
45 poky-*-toolchain-*.tar.bz2 52 poky-*-toolchain-*.tar.bz2
46 ) 53 )
47fi 54fi
48 55
49if [ "x$DISTRO" = "xpoky" ]; then 56if [ "x$ABTARGET" = "xpoky" ]; then
50 COMPRESS_FILES=( 57 COMPRESS_FILES=(
51 poky-image-sdk-qemuarm-*.rootfs.ext2 58 poky-image-sdk-qemuarm-*.rootfs.ext2
52 poky-image-sdk-qemux86-*.rootfs.ext2 59 poky-image-sdk-qemux86-*.rootfs.ext2
@@ -116,8 +123,8 @@ for FILE in ${COMPRESS_FILES[@]}; do
116 done 123 done
117done 124done
118 125
119if [ -e ./images-complete ]; then 126if [ -e ./images/images-complete ]; then
120 touch $DEST/complete 127 touch $DEST/complete
121fi 128fi
122chmod a+w -R $DEST || true 129chmod a+w -R $DEST 2> /dev/null || true
123 130