#!/bin/sh if [ -t 2 ] then BOLD="\033[1m" GREEN="\033[1;32m" NORMAL="\033[0m" RED="\033[1;31m" YELLOW="\033[1;33m" else BOLD="" GREEN="" NORMAL="" RED="" YELLOW="" fi script=`basename $0` die () { echo "${BOLD}$script: ${RED}error:${NORMAL} $*" 1>&2 exit 1 } fatal () { echo "${BOLD}$script: ${RED}fatal error:${NORMAL} $*" 1>&2 exit 1 } msg () { echo "$script: $*" 1>&2 } wrn () { echo "${BOLD}$script: ${YELLOW}warning:${NORMAL} $*" 1>&2 } cd `dirname $0`/.. root=`pwd` tmp=/tmp/`basename $script .sh` name=$tmp.name rm -f $tmp* usage () { cat <$starexec_build #!/bin/sh cd build exec ./build.sh EOF chmod 755 $starexec_build for config in default sat unsat do build=$dir/build/build.sh cat < $build #!/bin/sh tar xf ../archive/kissat* mv kissat* kissat cd kissat ./configure --competition --$config --test make all || exit 1 build/tissat || exit 1 exec install -s build/kissat ../../bin/ EOF chmod 755 $build starexec_run_default=$dir/bin/starexec_run_default cat <$starexec_run_default #!/bin/sh exec ./kissat --$config \$1 \$2/proof.out EOF chmod 755 $starexec_run_default msg "generated '$config' build and run scripts" description=$dir/starexec_description.txt cat <$description Keep it Simple bare metal SAT solver with $config configuration EOF msg "included the following description:" printf $BOLD cat $description printf $NORMAL zipfile=/tmp/$base-$config.zip rm -f $zipfile cd $dir zip -q -r $zipfile . cd /tmp/ msg "generated ${GREEN}'$zipfile'${NORMAL}" BYTES="`ls --block-size=1 -s $zipfile 2>/dev/null |awk '{print $1}'`" msg "zip file has $BYTES bytes" echo $zipfile done