Magellan Linux

Diff of /trunk/mage-buildserver/buildserver-setup-mage-tree.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2786 by niro, Thu Aug 28 09:28:14 2014 UTC revision 2787 by niro, Thu Aug 28 09:31:31 2014 UTC
# Line 6  source ${BUILDSERVER_CONFIG_DIR}/buildse Line 6  source ${BUILDSERVER_CONFIG_DIR}/buildse
6    
7  source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh  source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh
8    
9    FORCE=0
10    if [[ $1 = --force ]]
11    then
12     FORCE=1
13    fi
14    
15  if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ]  if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ]
16  then  then
17   die "svn checkout of mage required. run buildserver-svn first."   die "svn checkout of mage required. run buildserver-svn first."
# Line 17  fi Line 23  fi
23    
24  for arch in ${BUILD_ARCH[*]} src  for arch in ${BUILD_ARCH[*]} src
25  do  do
26   if [ -d ${BUILDROOT}/${arch}/usr/mage ]   if [ ! -f ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok ] || [[ ${FORCE} = 1 ]]
27   then   then
28   rm -r ${BUILDROOT}/${arch}/usr/mage || die "${arch} cleaning mage tree"   [[ ${FORCE} = 1 ]] && echo "Warning: mage-tree regen was enforced for arch '${arch}'."
  fi  
29    
30   # create buildroot layout   # create buildroot layout
31   if [ -d ${BUILDROOT}/mage-tree/${arch} ]   if [ -d ${BUILDROOT}/mage-tree/${arch} ]
32   then   then
33   rm -r ${BUILDROOT}/mage-tree/${arch} || die "cleaning global mage tree tmp"   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"   install -d ${BUILDROOT}/mage-tree/${arch} || die "creating global mage tree tmp dir"
35   fi   fi
36    
37   runarch "${arch}" mage regen-mage-tree || die "${arch} regen mage tree"   if [ -d ${BUILDROOT}/${arch}/usr/mage ]
38   touch ${BUILDROOT}/.stamps/${arch}_initial-mage-tree-ok   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     fi
47  done  done

Legend:
Removed from v.2786  
changed lines
  Added in v.2787