thousand-rooms/build.sh
2022-01-03 11:18:06 -08:00

17 lines
232 B
Bash
Executable file

#!/bin/sh -e
echo "Cleaning.."
rm -f ./bin/book
if [ "${1}" = '--format' ];
then
echo "Formatting.."
clang-format -i src/book.c
fi
mkdir -p bin
mkdir -p output
cc -std=c89 -DNDEBUG -Os -g0 -s src/book.c -o bin/book
bin/book