#!/bin/bash

# Determine the project directory dynamically
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export PROJECT="$(cd "$SCRIPT_DIR/.." && pwd)"
export PROJECT_BIN="$PROJECT/bin"
export PROJECT_CFG="$PROJECT/cfg"
export PROJECT_DOC="$PROJECT/doc"
export PROJECT_LIB="$PROJECT/lib"
export PROJECT_DATA="$PROJECT/data"
export PROJECT_WORK="$PROJECT/work"
export PROJECT_TEST="$PROJECT/testdata"
export PROJECT_LOG="$PROJECT/logs"
export PROJECT_TRANSLATION="$PROJECT/translation"

# Linux executable instead of Windows .exe
export SIVAS_TEILESTAMM="/usr/local/bin/KSbExcelExportSivasTeilestamm"
export SIVAS_EXCEL_EXPORT_DIR="$PROJECT_DATA"

# Create directories if they don't exist
mkdir -p "$PROJECT/work"
mkdir -p "$PROJECT/data"
mkdir -p "$PROJECT/logs"
mkdir -p "$PROJECT/translation"
mkdir -p "$PROJECT/testdata"

# Samba shares (adjust mount points as needed)
export PROJECT_IO_RESULTS=$PROJECT_WORK
export PROJECT_BOM_RESULTS=$PROJECT_WORK
export INSTALL_DIR="$HOME/kabeltool"

# Add project bin to PATH (only if not already added)
export PATH="$PROJECT_BIN:$PATH"

# Network Python interpreter (optional)
# export NETWORK_PYTHON=/path/to/network/python
