#!/bin/bash # Edit: by Marc Feger # activate bash script with chmod +x <name>.sh TEST=_tests CHECK_FLAGS=$(pkg-config --cflags --libs check) #find correct flags for check echo "Testfile and Input Data must have the same " read -p "Input Data: " INPUT_NAME #read file to test read -p "Output Data: " OUTPUT_NAME #read name of the output file echo "compiling tests..." gcc $INPUT_NAME.c $INPUT_NAME$TEST.c -o $OUTPUT_NAME $CHECK_FLAGS -Wall -std=c99 -g echo "compiling done" echo "##########RESULTS##########" ./$OUTPUT_NAME