trs/run.sh
2024-07-09 11:07:45 +03:00

23 lines
274 B
Bash
Executable File

#!/bin/zsh
PROJECT_NAME=$(basename $PWD)
run() {
command meson compile -C build
if [[ -z "$1" ]]; then
cd build
./tests/$PROJECT_NAME
cd ..
else
meson test $1 -C build
fi
}
if [ -d "build" ]; then
run
else
command meson setup build
run
fi