From 5d958f8af1646f9cb4763bb2f020bb2e6de8a3c0 Mon Sep 17 00:00:00 2001 From: nic-gaffney Date: Tue, 27 Jun 2023 03:19:39 -0500 Subject: help --- build.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index b8a9b9c..62bd830 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,11 @@ # Build Sloth cargo build - +FILENAME="$1" # Compile standard library -./target/debug/sloth std/stdio.sloth std/stdlib.sloth std/stdmath.sloth "$1" +./target/debug/sloth std/stdio.sloth std/stdlib.sloth std/stdmath.sloth $FILENAME # Generate binary -clang output.o std/stdio.c std/stdlib.c std/stdmath.c -o program +clang output.o std/stdio.c std/stdlib.c std/stdmath.c -o "${FILENAME%.sloth}" + +# Move file +mv "${FILENAME%.sloth}" . -- cgit v1.2.3