From 8f771762bce4bb8bb8ca422bd7d2091a08865a2e Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Fri, 17 Apr 2026 18:26:32 -0400 Subject: [PATCH] fix(setup): Correct TUI quickload syntax, robust Quicklisp path, and persistent PATH configuration --- literate/setup.org | 14 ++++++++++++-- opencortex.sh | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/literate/setup.org b/literate/setup.org index 1e31db4..85f499c 100644 --- a/literate/setup.org +++ b/literate/setup.org @@ -110,6 +110,16 @@ setup_system() { mkdir -p "$HOME/.local/bin" ln -sf "$SCRIPT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex" + # Ensure ~/.local/bin is in PATH for future sessions + for shell_config in "$HOME/.bashrc" "$HOME/.profile"; do + if [ -f "$shell_config" ]; then + if ! grep -q ".local/bin" "$shell_config"; then + echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$shell_config" + fi + fi + done + export PATH="$HOME/.local/bin:$PATH" + echo -e "${YELLOW}--- Compiling and Loading OpenCortex (this may take a minute) ---${NC}" sbcl --non-interactive \ @@ -192,9 +202,9 @@ if [[ "$1" == "tui" ]]; then # Launch TUI echo -e "${BLUE}Launching Croatoan TUI...${NC}" exec sbcl --non-interactive \ - --load ~/quicklisp/setup.lisp \ + --eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \ --eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \ - --eval "(ql:quickload '(:opencortex :croatoan)/tui :silent t)" \ + --eval "(ql:quickload :opencortex/tui)" \ --eval "(opencortex.tui:main)" fi diff --git a/opencortex.sh b/opencortex.sh index ad024c9..173488b 100755 --- a/opencortex.sh +++ b/opencortex.sh @@ -101,6 +101,16 @@ setup_system() { mkdir -p "$HOME/.local/bin" ln -sf "$SCRIPT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex" + # Ensure ~/.local/bin is in PATH for future sessions + for shell_config in "$HOME/.bashrc" "$HOME/.profile"; do + if [ -f "$shell_config" ]; then + if ! grep -q ".local/bin" "$shell_config"; then + echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$shell_config" + fi + fi + done + export PATH="$HOME/.local/bin:$PATH" + echo -e "${YELLOW}--- Compiling and Loading OpenCortex (this may take a minute) ---${NC}" sbcl --non-interactive \ @@ -183,9 +193,9 @@ if [[ "$1" == "tui" ]]; then # Launch TUI echo -e "${BLUE}Launching Croatoan TUI...${NC}" exec sbcl --non-interactive \ - --load ~/quicklisp/setup.lisp \ + --eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \ --eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \ - --eval "(ql:quickload '(:opencortex :croatoan)/tui :silent t)" \ + --eval "(ql:quickload :opencortex/tui)" \ --eval "(opencortex.tui:main)" fi