aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbuild.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..92b71e4
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+args="-Wall --pedantic"
+
+case $1 in
+ make)
+ for f in *.c; do
+ printf "Compiling %s\n" $f
+ gcc $f -o $(echo $f | sed 's/\.c//') $args
+ done
+ ;;
+ clean)
+ for f in *.c; do
+ rm $(echo $f | sed 's/\.c//')
+ done
+ ;;
+ *)
+ printf "'%s' is not an option!\n" $1
+ ;;
+esac