# Pastebin qYyJKv8G #!/bin/bash # Initial and constant buildman args ARGS="-devl -PEWM" ALL=0 KEEP=0 # Find our arguments while test $# -ne 0; do if [ "$1" == "--all" ]; then ALL=1 shift 1 elif [ "$1" == "--branch" ]; then BRANCH=$2 shift 2 elif [ "$1" == "--keep" ]; then KEEP=1 ARGS="$ARGS -k" shift 1 elif [ "$1" == "--board" ]; then MACHINE="--board $2" OUTDIR=/tmp/$2 shift 2 else MACHINE=$1 shift 1 fi done OUTDIR=${OUTDIR:-/tmp/$MACHINE} if [ -z "$MACHINE" ]; then echo Usage: $0 MACHINE [--all] [--keep] [--branch BRANCH] exit 1 fi # If not all, then only first/last if [ $ALL -ne 1 ]; then ARGS="$ARGS --step 0" fi if [ ! -z $BRANCH ]; then ARGS="$ARGS -b $BRANCH" else ARGS="$ARGS -b `git rev-parse --abbrev-ref HEAD`" fi mkdir -p ${OUTDIR} export SOURCE_DATE_EPOCH=`date +%s` ./tools/buildman/buildman -o ${OUTDIR} $ARGS -SBC $MACHINE ./tools/buildman/buildman -o ${OUTDIR} $ARGS -SsB $MACHINE [ $KEEP -eq 0 ] && rm -rf ${OUTDIR}