# Pastebin 4CjFS16U #!/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 else MACHINE=$1 shift fi done 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 /tmp/$MACHINE export SOURCE_DATE_EPOCH=`date +%s` ./tools/buildman/buildman -o /tmp/$MACHINE $ARGS -SBC $MACHINE ./tools/buildman/buildman -o /tmp/$MACHINE $ARGS -SsB $MACHINE [ $KEEP -eq 0 ] && rm -rf /tmp/$MACHINE