Skip to content

Instantly share code, notes, and snippets.

@ErikSwan
Created January 30, 2013 08:40
Show Gist options
  • Save ErikSwan/4671697 to your computer and use it in GitHub Desktop.
Save ErikSwan/4671697 to your computer and use it in GitHub Desktop.
#!/bin/sh
PATH=$PATH:. && export PATH
if [ $# == 1 ]; then
BASE=`echo $1 | sed -e 's/.c//g'`
gcc -Wall -Werror -lm $1 -o $BASE && $BASE
else
echo "Must pass in single argument (path of .c file)"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment