Skip to content

Commit

Permalink
Add script to build all firmware.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Mets authored and Matt Mets committed Jul 13, 2011
1 parent 18b5900 commit 1290e37
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions v2/build_all.sh
@@ -0,0 +1,44 @@
#!/bin/sh

MOTHERBOARD_SCONS=SConstruct
EXTRUDER_SCONS=SConstruct.extruder

MOTHERBOARD_PLATFORMS=( rrmbv12 mcv10 mb24 mb24-2560 )
EXTRUDER_PLATFORMS=( ecv22 ecv34 )

LOG_FILE=build_all_output


function build_firmware {
platform_list_name="$1[*]"
platform_list=(${!platform_list_name})
scons_file=$2

for platform in ${platform_list[@]}
do
echo -n "Building firmware for ${platform}... "

echo -e "\n\n\n\n" >> ${LOG_FILE}
echo Building firmware for ${platform} >> ${LOG_FILE}

scons -f ${scons_file} platform=${platform} >> ${LOG_FILE} 2>&1

if [ "$?" -ne "0" ]; then
echo Failure
else
echo Success
fi
done


}




echo Building all firmware

echo "Building all firmware" > ${LOG_FILE}

build_firmware MOTHERBOARD_PLATFORMS ${MOTHERBOARD_SCONS}
build_firmware EXTRUDER_PLATFORMS ${EXTRUDER_SCONS}

0 comments on commit 1290e37

Please sign in to comment.