Created
June 7, 2023 23:58
-
-
Save ia/417d0d183d86270339c4ce64469b98d3 to your computer and use it in GitHub Desktop.
Custom personal script to build IronOS for every supported model/language
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# To build: | |
# $ time ./build_local.sh 2>&1 | tee -a makeALL.log | |
# To clean: | |
# $ make clean && rm -Rf Release Release_Z makeALL.log | |
langs="BG CS DA DE EN ES FI FR HR HU IT LT NL NL_BE NB PL PT RU SK SL SR_CYRL SR_LATN SV TR UK VI JA_JP YUE_HK ZH_CN ZH_TW" | |
models="TS100 TS80 TS80P Pinecil MHP30 Pinecilv2" | |
REL="Release" | |
HEX="Hexfile" | |
J=$((`cat /proc/cpuinfo | grep "^processor" | wc -l`*4)) | |
mkdir -p "${REL}" | |
for m in ${models}; do | |
echo -ne " ====>>>> Building for ${m} ...\n\n" | |
mkdir "${REL}"/"${m}" | |
for l in ${langs}; do | |
echo -ne " ========>>>>>>>> Building for ${m} / ${l} ...\n\n" | |
echo " ========>>>>>>>> $ make -j${J} model=${m} firmware-${l}" | |
make -j${J} model=${m} firmware-${l} | |
echo -ne " ========>>>>>>>> Building for ${m} / ${l} DONE\n\n" | |
mv "${HEX}"/"${m}"_"${l}".{bin,hex,dfu} "${REL}"/"${m}" | |
done; | |
echo -ne " ====>>>> Building for ${m} DONE\n\n" | |
cp ../{LICENSE,LICENSE_RELEASE.md} "${REL}"/"${m}" | |
make clean | |
done; | |
echo -ne " ====>>>> Packing builds\n\n" | |
cd "${REL}" | |
for z in `ls`; do | |
zip -r "${z}".zip "${z}" | |
done; | |
echo -ne " ====>>>> Moving packages to a separate directory\n\n" | |
cd .. | |
mkdir -p "${REL}"_Z | |
mv "${REL}"/*.zip "${REL}"_Z | |
echo -ne " ====>>>> OK" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment