Annotation of /trunk/mage-buildserver/buildserver-setup-mage-tree.sh
Parent Directory | Revision Log
Revision 2788 -
(hide annotations)
(download)
(as text)
Thu Aug 28 09:32:02 2014 UTC (10 years ago) by niro
File MIME type: application/x-sh
File size: 1343 byte(s)
Thu Aug 28 09:32:02 2014 UTC (10 years ago) by niro
File MIME type: application/x-sh
File size: 1343 byte(s)
-respect all possible arches
1 | niro | 2588 | #!/bin/bash |
2 | |||
3 | # get configuration | ||
4 | BUILDSERVER_CONFIG_DIR="/etc/mage-buildserver" | ||
5 | source ${BUILDSERVER_CONFIG_DIR}/buildserver.conf | ||
6 | |||
7 | source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh | ||
8 | |||
9 | niro | 2787 | FORCE=0 |
10 | if [[ $1 = --force ]] | ||
11 | then | ||
12 | FORCE=1 | ||
13 | fi | ||
14 | |||
15 | niro | 2588 | if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ] |
16 | then | ||
17 | die "svn checkout of mage required. run buildserver-svn first." | ||
18 | fi | ||
19 | if [ ! -f ${BUILDROOT}/.stamps/smage_svn-checkout-ok ] | ||
20 | then | ||
21 | die "svn checkout of smage required. run buildserver-svn first." | ||
22 | fi | ||
23 | |||
24 | niro | 2788 | for arch in $(enum-all-arch-types) |
25 | niro | 2588 | do |
26 | niro | 2787 | if [ ! -f ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok ] || [[ ${FORCE} = 1 ]] |
27 | niro | 2588 | then |
28 | niro | 2787 | [[ ${FORCE} = 1 ]] && echo "Warning: mage-tree regen was enforced for arch '${arch}'." |
29 | niro | 2588 | |
30 | niro | 2787 | # create buildroot layout |
31 | if [ -d ${BUILDROOT}/mage-tree/${arch} ] | ||
32 | then | ||
33 | rm -r ${BUILDROOT}/mage-tree/${arch} || die "cleaning global mage tree tmp" | ||
34 | install -d ${BUILDROOT}/mage-tree/${arch} || die "creating global mage tree tmp dir" | ||
35 | fi | ||
36 | |||
37 | if [ -d ${BUILDROOT}/${arch}/usr/mage ] | ||
38 | then | ||
39 | rm -r ${BUILDROOT}/${arch}/usr/mage || die "${arch} cleaning mage tree" | ||
40 | fi | ||
41 | |||
42 | runarch "${arch}" mage regen-mage-tree || die "${arch} regen mage tree" | ||
43 | touch ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok | ||
44 | else | ||
45 | echo "Warning: mage-tree already generated for arch '${arch}'. Run with --force switch to overwrite." | ||
46 | niro | 2785 | fi |
47 | niro | 2588 | done |
Properties
Name | Value |
---|---|
svn:executable | * |