diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-03-25 22:39:06 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-03-25 22:39:06 -0400 |
commit | f3a773c750181f8f3d52fd672587814275a04bd7 (patch) | |
tree | 8c37ae892960f0988aa6006661beef4ff8b8e8e5 /tnslc/run.sh | |
parent | 0bc05b40d541483d16445b98ea0841d1912a8198 (diff) |
Remove old parser files
Diffstat (limited to 'tnslc/run.sh')
-rwxr-xr-x | tnslc/run.sh | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/tnslc/run.sh b/tnslc/run.sh index 9957e15..904e281 100755 --- a/tnslc/run.sh +++ b/tnslc/run.sh @@ -1,18 +1,13 @@ #!/bin/bash -BUILD_DIR="./build" -ARTIFACTS_DIR="$BUILD_DIR/artifacts" - -if [ ! -d $BUILD_DIR ]; then - mkdir $BUILD_DIR -fi - -if [ ! -d $ARTIFACTS_DIR ]; then - mkdir $ARTIFACTS_DIR -fi - -../tint -in tnslc.tnsl -flags "$1" -mv -f "$1.asm" "$ARTIFACTS_DIR/$1.asm" -nasm -f elf64 -o "$ARTIFACTS_DIR/$1.o" "$ARTIFACTS_DIR/$1.asm" -clang -o "./build/${1%.*}" "$ARTIFACTS_DIR/$1.o" +BUILD_DIR=./build +ARTIFACT_DIR=$BUILD_DIR/artifacts + +mkdir -p $BUILD_DIR +mkdir -p $ARTIFACT_DIR +filename=tnslc.tnsl +filename="${filename%.*}" +./ctc $filename.tnsl $ARTIFACT_DIR/$filename.asm +nasm -f elf64 -o $ARTIFACT_DIR/$filename.o $ARTIFACT_DIR/$filename.asm +gcc -o $BUILD_DIR/$filename $ARTIFACT_DIR/$filename.o |