comparison 1-Ruby/run.sh @ 4:9f14e665fd1b

Add runner script to run through ruby and irb and log output in a consistent way
author IBBoard <dev@ibboard.co.uk>
date Mon, 02 Jan 2017 20:36:04 +0000
parents
children
comparison
equal deleted inserted replaced
3:38f4a671cfa4 4:9f14e665fd1b
1 #! /bin/bash
2
3 if [[ $# -ne 1 ]]; then
4 echo "Need to supply file to run" >2
5 exit 1
6 elif [[ ! -f $1 ]]; then
7 echo "Need to supply file to run" >2
8 exit 1
9 fi
10
11 ruby "$1" > "${1/.rb}"-ruby.output 2>&1
12 irb "$1" > "${1/.rb}"-irb.output 2>&1