Skip to content

Instantly share code, notes, and snippets.

@chuckwagoncomputing
Created February 18, 2014 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuckwagoncomputing/9061938 to your computer and use it in GitHub Desktop.
Save chuckwagoncomputing/9061938 to your computer and use it in GitHub Desktop.
Shakespeare 2 C Wrapper script
#!/bin/bash
LOCATION="/usr/local/bin"
if [ $# -eq 2 ]; then
if [ -f $1 ]; then
$LOCATION/spl/bin/spl2c < $1 > $2.c
gcc $2.c -o $2 -I $LOCATION/spl/include -L $LOCATION/spl/lib -lspl -lm
rm $2.c
rm $1
else
echo "USAGE: spl2c [file to compile] [name of resulting program]"
fi
else
echo "USAGE: spl2c [file to compile] [name of resulting program]"
fi
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment