Exit on compilation error

This commit is contained in:
augustin64 2022-05-14 15:56:13 +02:00
parent b676b28f2d
commit 11002758f6

View File

@ -3,6 +3,8 @@
FLAGS="-std=c99 -lm -lpthread" FLAGS="-std=c99 -lm -lpthread"
OUT="out" OUT="out"
set -eu
if [[ $1 == "build" ]]; then if [[ $1 == "build" ]]; then
mkdir -p "$OUT" mkdir -p "$OUT"
[[ $2 ]] || set "$1" "main" [[ $2 ]] || set "$1" "main"