From 47a2ff2a2d2e547661ddc1b855a1cbeb72b8a291 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Fri, 17 Apr 2026 17:12:01 -0400 Subject: [PATCH] fix(setup): Export Merkle/Org-Object symbols and perform synchronous pre-load in setup --- literate/setup.org | 13 ++++++++++++- opencortex.sh | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/literate/setup.org b/literate/setup.org index 3673308..dca9391 100644 --- a/literate/setup.org +++ b/literate/setup.org @@ -99,7 +99,18 @@ setup_system() { mkdir -p "$HOME/.local/bin" ln -sf "$SCRIPT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex" - echo -e "${YELLOW}--- Finalizing: Awakening the Brain for the first time ---${NC}" + + echo -e "${YELLOW}--- Compiling and Loading OpenCortex (this may take a minute) ---${NC}" + sbcl --non-interactive \ + --eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \ + --eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \ + --eval "(ql:quickload :opencortex)" + + if [ $? -ne 0 ]; then + echo -e "${RED}✗ Compilation or Loading failed.${NC}" + exit 1 + fi +\n echo -e "${YELLOW}--- Finalizing: Awakening the Brain as a background daemon ---${NC}" # Nuke any existing brain logs > "$SCRIPT_DIR/brain.log" "$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 & diff --git a/opencortex.sh b/opencortex.sh index c289834..b28314b 100755 --- a/opencortex.sh +++ b/opencortex.sh @@ -90,7 +90,18 @@ setup_system() { mkdir -p "$HOME/.local/bin" ln -sf "$SCRIPT_DIR/opencortex.sh" "$HOME/.local/bin/opencortex" - echo -e "${YELLOW}--- Finalizing: Awakening the Brain for the first time ---${NC}" + + echo -e "${YELLOW}--- Compiling and Loading OpenCortex (this may take a minute) ---${NC}" + sbcl --non-interactive \ + --eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \ + --eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \ + --eval "(ql:quickload :opencortex)" + + if [ $? -ne 0 ]; then + echo -e "${RED}✗ Compilation or Loading failed.${NC}" + exit 1 + fi +\n echo -e "${YELLOW}--- Finalizing: Awakening the Brain as a background daemon ---${NC}" # Nuke any existing brain logs > "$SCRIPT_DIR/brain.log" "$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 &