Magellan Linux

Diff of /trunk/mage-buildserver/buildserver-functions.sh

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

revision 2774 by niro, Thu Aug 28 09:08:32 2014 UTC revision 2777 by niro, Thu Aug 28 09:12:09 2014 UTC
# Line 4  die() Line 4  die()
4   exit 1   exit 1
5  }  }
6    
7    os-arch()
8    {
9     local arch="$1"
10     local os_arch
11    
12     case ${arch} in
13     i*86|x86_64) os_arch="${arch}" ;;
14     src|playground*) os_arch="$(source ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc; echo ${ARCH})";;
15     esac
16    
17     echo "${os_arch}"
18    }
19    
20  runarch-script()  runarch-script()
21  {  {
22   local arch="$1"   local arch="$1"
# Line 55  runarch() Line 68  runarch()
68    
69   # create runrc   # create runrc
70   echo "${cmd}" > "${runrc}"   echo "${cmd}" > "${runrc}"
71   runarch-script "${arch}" .runrc || die "runarch script execition of '${runrc}' failed."   runarch-script "${arch}" .runrc || die "runarch script execution of '${runrc}' failed."
72    
73   if [ -f "${runrc}" ]   if [ -f "${runrc}" ]
74   then   then
# Line 79  runarch-pkg-install() Line 92  runarch-pkg-install()
92   # never fail   # never fail
93   return 0   return 0
94  }  }
95    
96    enum-build-arch-types()
97    {
98     echo "${BUILD_ARCH[*]}"
99    }
100    
101    enum-all-arch-types()
102    {
103     local arch
104     local build_arch_types
105    
106     for arch in src ${BUILD_ARCH[*]}
107     do
108     if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc ]
109     then
110     echo "Warning: mage.rc of '${arch}' not found. Arch '${arch}' ignored." >&2
111     else
112     build_arch_types+=( "${arch}" )
113     fi
114     done
115    
116     if [[ ${BUILD_PLAYGROUND} -eq 1 ]]
117     then
118     for arch in ${BUILD_ARCH[*]}
119     do
120     if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/playground-${arch}/mage.rc ]
121     then
122     echo "Warning: mage.rc of 'playground-${arch}' not found. Arch 'playground-${arch}' ignored." >&2
123     else
124     build_arch_types+=( "playground-${arch}" )
125     fi
126     done
127     fi
128    
129     echo "${build_arch_types[*]}"
130    }

Legend:
Removed from v.2774  
changed lines
  Added in v.2777