#!/bin/bash
# CubeShell - Simple version using Maven exec plugin
# Parse arguments
HOST="localhost"
PORT="8080"
while [[ $# -gt 0 ]]; do
case $1 in
--host|-h)
HOST="$2"
shift 2
;;
--port|-p)
PORT="$2"
shift 2
;;
*)
echo "Unknown option: $1"
echo "Usage: $0 [--host HOST] [--port PORT]"
exit 1
;;
esac
done
echo "═══════════════════════════════════════════════════════════"
echo " CubeShell - Distributed Database Management Shell "
echo "═══════════════════════════════════════════════════════════"
echo ""
echo "Connecting to: $HOST:$PORT"
echo ""
# Use Maven to run with correct classpath
mvn exec:java \
-Dexec.mainClass="com.cube.shell.CubeShell" \
-Dexec.args="--host $HOST --port $PORT" \
-Dexec.cleanupDaemonThreads=false \
-q