From c4ca3c8644c47fb3e943e45b51f0e572278813e4 Mon Sep 17 00:00:00 2001 From: purian23 Date: Fri, 14 Nov 2025 00:22:49 -0500 Subject: [PATCH] Add root dms-cli build script --- dms-bin.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 dms-bin.sh diff --git a/dms-bin.sh b/dms-bin.sh new file mode 100755 index 00000000..48cc1ec6 --- /dev/null +++ b/dms-bin.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Build script wrapper for dms-cli core binaries +# Forwards make commands to core/Makefile + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CORE_DIR="$SCRIPT_DIR/core" + +# Colors for output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Check if core directory exists +if [ ! -d "$CORE_DIR" ]; then + echo "Error: core directory not found at $CORE_DIR" + exit 1 +fi + +# If no arguments provided, build and install +if [ $# -eq 0 ]; then + echo -e "${BLUE}Building and installing DMS CLI binary...${NC}" + cd "$CORE_DIR" + make && sudo make install + exit 0 +fi + +# Forward all arguments to make in core directory +echo -e "${GREEN}Building in core directory...${NC}" +cd "$CORE_DIR" +make "$@"