Skip to content

Instantly share code, notes, and snippets.

@Somsubhra
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save Somsubhra/91ffc8890fa146bcb43e to your computer and use it in GitHub Desktop.

Select an option

Save Somsubhra/91ffc8890fa146bcb43e to your computer and use it in GitHub Desktop.
tsh Evaluation Script
#!/bin/sh
# Script for evaluation of tsh lab
# @author: Somsubhra (@s7a)
#
# Instructions for using this script:
# 1. Place the submission files in a directory called 'submissions'
# at the root of the tsh folder.
# 2. Place this script file at the root of the tsh folder.
# 3. chmod a+x <this_script_file_name>
# 4. ./<this_script_file_name>
# 5. Results are written to 'result' directory.
make clean
mkdir "result"
mkdir "result/submissions"
mkdir "result/result"
mkdir "result/result/submissions"
for entry in "submissions"/*
do
make clean
mv "$entry" tsh.c
make
for iter in $(seq -f "%02g" 1 16)
do
make "test$iter" >> "result/$entry.out"
done
done
for entry in "result/submissions"/*
do
diff "$entry" tshref.out > "result/$entry.diff"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment