Newer
Older
echo "workdir is $(pwd)"
. prod_build/general/pre-build.sh
export_variables "prod_build/general/conf/*"
. prod_build/general/mod-handler.sh
mod_handler $MOD
IFS=' '
[ -e config.pribak ] && rm config.pribak
VERSION_STRING=$(echo "$VERSION_FORMAT" | sed "s/\"//g" ) #Removing quotes
VERSION_ENTRIES=$(echo "$VERSION_ENTRIES" | sed "s/\"//g" )
export VERSION_STRING=$(extract_version_number)
errcode=0
errstring=""
echo "Platform Candidates test"
echo $IMPLEMENTED
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
echo "checking out $platform"
[[ $(echo $IMPLEMENTED | grep $platform) != "" ]] && PLATFORMS="$PLATFORMS$platform " || echo "Platform $platform is not implemented in this project yet. Sorry"
echo "Working with $platform now on $brand brand"
PLATFORM_UPPERCASED=$( echo "$platform" | tr '[:lower:]' '[:upper:]')
ENV=${PLATFORM_UPPERCASED}_ENV
varpack=$( export | grep $PLATFORM_UPPERCASED | awk '{print $3}')
if [ $(echo $platform | grep "linux") ]; then
ln -snf prod_build/linux/debian/essentials/$brand ./debian && ls -la . | grep debian
[[ $platform == "linux" ]] && platform="linux/debian"
export_variables "./prod_build/$platform/conf/*"
elif [ $(echo $platform | grep -v "mac") ]; then
export_variables "./prod_build/$platform/conf/*"
fi
if [[ $platform == "mac" ]]; then
[ -e prod_build/$platform/scripts/pre-build.sh ] && prod_build/$platform/scripts/pre-build.sh $CHROOT_PREFIX $platform || { errcode=$? && errstring="$errstring macprebuild $errcode" && echo "[ERR] Mac host prefetch errcode $errcode. Skipping"; exit $errcode; } #Setting up brand in conf file
for conffile in $(find "./prod_build/$platform/conf" | grep conf/ | grep -v .bak); do
export_variables $conffile
done
IFS=' '
for arch in $ARCH_VERSIONS; do
prod_build/$platform/scripts/build.sh $arch || { errcode=$? && errstring="$errstring macbuild $errcode" && echo "[ERR] Mac host build errcode $errcode now. Skipping"; exit $errcode; }
done
exit 0
else
[[ -e prod_build/$platform/scripts/pre-build.sh ]] && prod_build/$platform/scripts/pre-build.sh $platform || echo "[WRN] No pre-build script detected. Moving on" #For actions before build not in chroot and in chroot (version update, install missing dependencies(under schroot))
prod_build/$platform/scripts/build.sh || { errcode=$? && errstring="$errstring ${platform}_build $errcode" && echo "[ERR] $platform build on $HOST_DISTR_VERSIONS-$HOST_ARCH_VERSIONS errcode $errcode"; }
fi
unexport_variables "./prod_build/$platform/conf/*"
[[ $errstring != "" ]] && echo "$brand done with errors:" && echo "$errstring" >> ~/prod_log && errstring="" && errcode=5 ## General failure error
cd $wd
exit $errcode