diff options
author | Richard Purdie <richard@openedhand.com> | 2008-04-29 21:01:34 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-04-29 21:01:34 +0000 |
commit | da27611bc9c8506b9411ce9968f71bd229ca0654 (patch) | |
tree | 4318cc51f6a80d489e8cadd848ea949d4677652c /scripts | |
parent | 5d5fab77cf9616bf62023c202b38f309f8bbf189 (diff) | |
download | poky-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-x | scripts/poky-autobuild | 27 | ||||
-rwxr-xr-x | scripts/poky-autobuild-postprocess | 47 |
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 | 21 | TARGETDIR=/srv/poky/autobuild-output | |
22 | #if test x"$0" = x"./poky-init-build-env"; then | 22 | CURRDIR=`pwd` |
23 | # echo "Error: Run via '. ./poky-init-build-env'" | 23 | if [ "$CURRDIR" = "/srv/poky/autobuild/full-shihtzu/build" ]; then |
24 | # exit 1 | 24 | ABTARGET="poky" |
25 | #fi | 25 | elif [ "$CURRDIR" = "/srv/poky/autobuild/full-bleeding-shihtzu/build" ]; then |
26 | ABTARGET="poky-bleeding" | ||
27 | elif [ "$CURRDIR" = "/srv/poky/autobuild/toolchain-shihtzu/build" ]; then | ||
28 | ABTARGET="toolchain" | ||
29 | elif [ "$CURRDIR" = "/srv/poky/autobuild/incremental-shihtzu/build" ]; then | ||
30 | ABTARGET="incremental" | ||
31 | fi | ||
26 | 32 | ||
27 | if [ "xpreamble" = "x$1" ]; then | 33 | if [ "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` | |||
38 | if [ "xcomplete" = "x$1" ]; then | 44 | if [ "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 |
46 | fi | 52 | fi |
@@ -59,9 +65,8 @@ fi | |||
59 | 65 | ||
60 | bitbake $@ | 66 | bitbake $@ |
61 | 67 | ||
62 | cd .. | ||
63 | |||
64 | if [ "x$POSTPROCESS" != "x" ]; then | 68 | if [ "x$POSTPROCESS" != "x" ]; then |
65 | $POSTPROCESS `pwd` | 69 | cd .. |
70 | $POSTPROCESS $ABTARGET $TARGETDIR | ||
66 | fi | 71 | fi |
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 | ||
3 | TARGETDIR=/srv/poky/autobuild-output | 3 | # Poky Automated Build Server Post Processing Script |
4 | if [ "$1" = "/srv/poky/autobuild/full-shihtzu/build" ]; then | 4 | # |
5 | DISTRO="poky" | 5 | # Copyright (C) 2006-2007 OpenedHand Ltd. |
6 | fi | 6 | # |
7 | if [ "$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 |
9 | fi | 9 | # the Free Software Foundation; either version 2 of the License, or |
10 | if [ "$1" = "/srv/poky/autobuild/toolchain-shihtzu/build" ]; then | 10 | # (at your option) any later version. |
11 | DISTRO="toolchain" | 11 | # |
12 | fi | 12 | # This program is distributed in the hope that it will be useful, |
13 | if [ "$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 |
15 | fi | 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 | |||
21 | ABTARGET=$1 | ||
22 | TARGETDIR=$2 | ||
16 | 23 | ||
17 | cd $1/build/tmp/deploy/ | 24 | cd ./build/tmp/deploy/ |
18 | 25 | ||
19 | LASTREV=`tail images/svninfo | grep Revision | cut -f 2 -d ' '` | 26 | LASTREV=`tail images/svninfo | grep Revision | cut -f 2 -d ' '` |
20 | DEST=$TARGETDIR/$DISTRO/$LASTREV/ | 27 | DEST=$TARGETDIR/$ABTARGET/$LASTREV/ |
21 | 28 | ||
22 | mkdir -p $DEST | 29 | mkdir -p $DEST |
23 | 30 | ||
24 | COMPRESS_FILES=() | 31 | COMPRESS_FILES=() |
25 | FILES=() | 32 | FILES=() |
26 | 33 | ||
27 | if [ "x$DISTRO" = "xpoky-bleeding" ]; then | 34 | if [ "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 | ) |
40 | fi | 47 | fi |
41 | 48 | ||
42 | if [ "x$DISTRO" = "xtoolchain" ]; then | 49 | if [ "x$ABTARGET" = "xtoolchain" ]; then |
43 | FILES=( | 50 | FILES=( |
44 | svninfo | 51 | svninfo |
45 | poky-*-toolchain-*.tar.bz2 | 52 | poky-*-toolchain-*.tar.bz2 |
46 | ) | 53 | ) |
47 | fi | 54 | fi |
48 | 55 | ||
49 | if [ "x$DISTRO" = "xpoky" ]; then | 56 | if [ "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 |
117 | done | 124 | done |
118 | 125 | ||
119 | if [ -e ./images-complete ]; then | 126 | if [ -e ./images/images-complete ]; then |
120 | touch $DEST/complete | 127 | touch $DEST/complete |
121 | fi | 128 | fi |
122 | chmod a+w -R $DEST || true | 129 | chmod a+w -R $DEST 2> /dev/null || true |
123 | 130 | ||