mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-06-08 07:22:01 +00:00
commit
dbc959ef80
1 changed files with 23 additions and 0 deletions
23
run.sh
Executable file
23
run.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
# Build the cmake project
|
||||
cmake -S . -B build
|
||||
cmake --build build
|
||||
|
||||
# Check if the build was successful
|
||||
if [ ! -f "build/raytracer" ]; then
|
||||
echo "Build directory not found. Build failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the program for each json file in the specified filepath
|
||||
for jsonfile in "assets"/*.json; do
|
||||
if [ -f "$jsonfile" ]; then
|
||||
echo "Processing $jsonfile..."
|
||||
build/raytracer "$jsonfile"
|
||||
else
|
||||
echo "No JSON files found in $FILEPATH."
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f build/raytracer
|
Loading…
Add table
Add a link
Reference in a new issue