From cc07c46208b221ac97a2d6138299aa7b566b6a84 Mon Sep 17 00:00:00 2001 From: Squibid Date: Tue, 9 May 2023 21:52:20 -0400 Subject: add built script --- build.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 build.sh 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 -- cgit v1.2.1