Skip to content
Snippets Groups Projects
Commit 1f75fcb3 authored by alexandr.kravchenko's avatar alexandr.kravchenko
Browse files

Added static build support

parent 5cd32a68
No related branches found
No related tags found
1 merge request!11Cellframe clone
......@@ -7,24 +7,32 @@ CHROOT_PREFIX="builder"
CHROOTS_PATH=$1
PLATFORMS=""
PKG_FORMAT=$3
SRC_PATH=$4
JOB=$5
JOB=$4
export wd=$(pwd)
cd $SRC_PATH
echo "workdir is $(pwd)"
echo "workdir is $wd"
. prod_build/general/pre-build.sh
export_variables "./prod_build/general/conf/*"
. prod_build/general/mod-handler.sh
mod_handler $MOD
IFS=' '
echo "$PLATFORM_CANDIDATES"
echo $IMPLEMENTED
for platform in $PLATFORM_CANDIDATES; do
[[ $(echo $IMPLEMENTED | grep $platform) != "" ]] && PLATFORMS="$PLATFORMS$platform " || echo "Platform $platform is not implemented in this project yet. Sorry"
done
echo "Platforms are $PLATFORMS"
[[ $PLATFORMS != "" ]] && PLATFORMS=$(echo $PLATFORMS | sed 's/ $//')
echo "Platforms are $PLATFORMS there"
for platform in $PLATFORMS; do
echo "Working with $platform now"
PLATFORM_UPPERCASED=$( echo "$platform" | tr '[:lower:]' '[:upper:]')
ENV=${PLATFORM_UPPERCASED}_ENV
varpack = $( export | grep $PLATFORM_UPPERCASED | awk '{print $3}')
[[ $platform == "linux" ]] && platform="linux/debian"
export_variables "./prod_build/$platform/conf/*"
IFS=' '
PKG_TYPE=$(echo $PKG_FORMAT | cut -d ' ' -f1)
......
MOD="static"
mod_handler() {
MODLIST=$1
IFS=' '
for mod in $MODLIST; do
case $mod in
"blank")
sed -ibak "s/^#DAP_BLANK/DAP_BLANK/" config.pri || sed -ibak "s/^DAP_BLANK/#DAP_BLANK/" config.pri # For toggling blank mode in general scripts.
;;
"static")
[[ $(echo "$PLATFORM_CANDIDATES" | grep "linux") != "" ]] && sed -ibak "/static/s/^#unix/unix/" config.pri && [ ! -z "ICU_LINUX_PATH" ] && sed -ibak "s!ICU_LINUX_PATH!$ICU_LINUX_PATH!" config.pri && \
PLATFORM_CANDIDATES=$( echo $PLATFORM_CANDIDATES | sed "s/linux\/[a-z]\+ \?//g" | sed "s/$/ linux/" | sed "s/^ //") || sed -ibak "/static/s/^unix/#unix/" config.pri #For toggling static mode
;;
*)
echo "No handling required for mod $mod. Proceeding"
;;
esac
done
IFS='\n'
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment