#!/usr/bin/env bash # Knoe environment configuration # This file is generated by the installer. Source it in new shells, or execute as a wrapper: # "$KNOE_HOME/env.sh" [args…] # shellcheck shell=bash export KNOE_HOME="$HOME/dev/prole" export KNOE_CONF="$KNOE_HOME/conf" export PROLE_DATA="$KNOE_HOME/data" export PROLE_LOGS="$KNOE_HOME/logs" export KNOE_SERVICE="$KNOE_HOME/etc" # Ensure PATH works for GUI-launched shells (Docker, etc.) _knoe_add_path() { case ":${PATH}:" in *":$1:"*) ;; *) PATH="$1:${PATH:-}" ;; esac; } _knoe_add_path "$KNOE_HOME/bin" _knoe_add_path "/opt/homebrew/bin" _knoe_add_path "/usr/local/bin" _knoe_add_path "/usr/bin" _knoe_add_path "/bin" _knoe_add_path "/usr/sbin" _knoe_add_path "/sbin" export PATH # Add custom paths below if needed (examples): # If executed with arguments (and not sourced), run them under this environment if [[ "${BASH_SOURCE[0]}" == "${0}" ]] && [ "$#" -gt 0 ]; then exec "$@" fi