#!/bin/bash if [ "$#" -lt "1" ]; then echo "ERROR: You must pass the program name! For instance, to build maze.elf," echo "pass in just 'maze'" exit 1 fi make -f Makefile_PS2 PROGRAM_PS2="$1" if [ "$#" -gt "1" ]; then echo "Running on $2" ps2client -h "$2" reset sleep 1 ps2client -h "$2" execee host:$1.elf fi