#!/bin/bash if [[ $(basename $(pwd)) != 'day23' ]] ; then cd day23 fi file=$(mktemp --tmpdir=. --suffix=.c) trap "rm $file a.out" EXIT ./part2gen > $file gcc -O3 $file ./a.out