dropshell/source/cmake_prebuild.sh
Your Name a5e339a358
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 2m37s
tidying
2025-05-26 23:26:37 +12:00

25 lines
694 B
Bash
Executable File

#!/bin/bash
set -e
# CMake pre-build script.
# Runs before the build process.
# This script creates two files:
# src/utils/createagent.hpp
# src/utils/createagent.cpp
#
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# check if dehydrate is installed
if ! command -v dehydrate &> /dev/null; then
echo "dehydrate could not be found - installing"
curl -fsSL https://gitea.jde.nz/public/dehydrate/releases/download/latest/install.sh | bash
else
# ensure we have latest dehydrate.
dehydrate -u
fi
mkdir -p "${SCRIPT_DIR}/src/autogen"
dehydrate "${SCRIPT_DIR}/agent-remote" "${SCRIPT_DIR}/src/autogen"
dehydrate "${SCRIPT_DIR}/agent-local" "${SCRIPT_DIR}/src/autogen"