diff --git a/tooling2/.gitignore b/tooling2/.gitignore index df4b93b4..ec046da4 100644 --- a/tooling2/.gitignore +++ b/tooling2/.gitignore @@ -1,2 +1,5 @@ build/ -.claude/ \ No newline at end of file +.claude/ +bin/ +*.db +*.txt diff --git a/tooling2/setup b/tooling2/setup new file mode 100644 index 00000000..aa0ee162 --- /dev/null +++ b/tooling2/setup @@ -0,0 +1,23 @@ +#!/bin/bash + +# Create build directory if it doesn't exist +mkdir -p build/tmp + +if [ ! -d "build/tmp" ]; then + # Configure project using CMake with Ninja generator for Release build + cmake -S . -B build/tmp -G Ninja -DCMAKE_BUILD_TYPE=Release +fi + +# Build project using Ninja +cmake --build build/tmp --config Release + +# Create bin directory if it doesn't exist +mkdir -p bin + +# Copy binary to bin folder +# Use .exe extension on Windows, no extension on Unix-like systems +if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then + cp build/tmp/r3_gh_tool.exe bin/ +else + cp build/tmp/r3_gh_tool bin/ +fi