Add the ability to run the executable after building it in build.sh
This commit is contained in:
17
build.sh
17
build.sh
@@ -1,9 +1,22 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -xe
|
||||
|
||||
CFLAGS="-Wall -Wextra -std=c11 -ggdb -fsanitize=address -fsanitize=undefined"
|
||||
SRC="vec.c symtable.c tag.c constructor.c sys.c main.c"
|
||||
OUT="alisp.out"
|
||||
|
||||
set -xe
|
||||
build() {
|
||||
cc $CFLAGS -o $OUT $SRC;
|
||||
}
|
||||
|
||||
cc $CFLAGS -o $OUT $SRC;
|
||||
run() {
|
||||
./$OUT;
|
||||
}
|
||||
|
||||
build
|
||||
|
||||
if [ "$1" = "run" ]
|
||||
then
|
||||
run
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user