#!/bin/bash tmp_source=$(perl -e 'use File::Temp ":POSIX";$n=tmpnam();print"$n.c\n"') if [[ $# -ne 1 ]]; then echo "$0 " exit 1 fi function die() { rm -f "$tmp_source" echo "FAIL: $1" exit 1 } # original ./test_compile.sh "$1" || die "original" # original + shift perl rotate_cw.pl "$1" \ | perl rotate_cw.pl \ | perl ltrim.pl \ | perl rotate_cw.pl \ | perl rotate_cw.pl \ > "$tmp_source" ./test_compile.sh "$tmp_source" || die "original + shift" # rotate cw perl rotate_cw.pl "$1" > "$tmp_source" ./test_compile.sh "$tmp_source" || die "rotate cw" # rotate cw + shift perl ltrim.pl "$1" \ | perl rotate_cw.pl \ > "$tmp_source" ./test_compile.sh "$tmp_source" || die "rotate cw + shift" # rotate ccw perl rotate_ccw.pl "$1" > "$tmp_source" ./test_compile.sh "$tmp_source" || die "rotate ccw" # rotate ccw + shift perl ltrim.pl "$1" \ | perl rotate_ccw.pl \ > "$tmp_source" ./test_compile.sh "$tmp_source" || die "rotate ccw + shift" # rotate 180 perl rotate_cw.pl "$1" \ | perl rotate_cw.pl \ > "$tmp_source" ./test_compile.sh "$tmp_source" || die "rotate 180" # rotate 180 + shift perl rotate_cw.pl "$1" \ | perl ltrim.pl \ | perl rotate_cw.pl \ > "$tmp_source" ./test_compile.sh "$tmp_source" || die "rotate 180 + shift"