dropshell/runner/build.sh
Your Name 8827ea5a42
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 20s
.
2025-05-10 13:47:17 +12:00

39 lines
902 B
Bash
Executable File

#!/bin/bash
set -e
# Check for cmake
if ! command -v cmake &> /dev/null; then
echo "Error: cmake is not installed. Please install cmake." >&2
exit 1
fi
# Check for g++
if ! command -v g++ &> /dev/null; then
echo "Error: g++ is not installed. Please install g++." >&2
exit 1
fi
# Check for OpenSSL
if ! pkg-config --exists openssl; then
echo "Error: OpenSSL development libraries not found. Please install libssl-dev." >&2
exit 1
fi
# Check for nlohmann_json
if ! pkg-config --exists nlohmann_json; then
echo "Warning: nlohmann_json not found via pkg-config. Make sure it is installed or available to CMake." >&2
fi
BUILD_DIR=build
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
cmake ..
make -j$(nproc)
if [ -f runner ]; then
echo "Build successful. Run ./build/runner BASE64COMMAND to test."
else
echo "Build failed. Check the output above for errors."
exit 1
fi