fix(setup): Restore bash variables accidentally evaluated during refactor
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s

This commit is contained in:
2026-04-19 11:54:38 -04:00
parent eb33106771
commit d99166d41a
2 changed files with 28 additions and 28 deletions

View File

@@ -164,48 +164,48 @@ setup_system() {
# --- 3. COMMAND ROUTER --- # --- 3. COMMAND ROUTER ---
# By default, if no arguments are provided, we assume the user wants the CLI fallback. # By default, if no arguments are provided, we assume the user wants the CLI fallback.
COMMAND="cli" COMMAND=${1:-"cli"}
# However, if the system is completely uninitialized, we force the 'setup' command. # However, if the system is completely uninitialized, we force the 'setup' command.
if [ ! -f "/src/package.lisp" ] || [ ! -f "/.env" ]; then if [ ! -f "$SCRIPT_DIR/src/package.lisp" ] || [ ! -f "$SCRIPT_DIR/.env" ]; then
COMMAND="setup" COMMAND="setup"
fi fi
case "" in case "$COMMAND" in
setup) setup)
setup_system setup_system
;; ;;
--boot|boot) --boot|boot)
export SKILLS_DIR="/skills" export SKILLS_DIR="${SCRIPT_DIR}/skills"
[ -z "" ] && export MEMEX_DIR="/home/user/memex" [ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex"
exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* "FATAL LISP ERROR: ~a~%" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(format t "--- Quickloading OpenCortex ---~%")' --eval "(ql:quickload '(:opencortex :croatoan))" --eval '(opencortex:main)' exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* "FATAL LISP ERROR: ~a~%" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(format t "--- Quickloading OpenCortex ---~%")' --eval "(ql:quickload '(:opencortex :croatoan))" --eval '(opencortex:main)'
;; ;;
tui) tui)
if ! nc -z 2>/dev/null; then if ! nc -z $HOST $PORT 2>/dev/null; then
echo -e "Brain is offline. Awakening..." echo -e "Brain is offline. Awakening..."
"/opencortex.sh" --boot > "/brain.log" 2>&1 & "$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 &
for i in {1..15}; do for i in {1..15}; do
sleep 2 sleep 2
if nc -z 2>/dev/null; then break; fi if nc -z $HOST $PORT 2>/dev/null; then break; fi
echo -n "." echo -n "."
done done
echo "" echo ""
fi fi
echo -e "Launching Croatoan TUI..." echo -e "Launching Croatoan TUI..."
export SKILLS_DIR="/skills" export SKILLS_DIR="${SCRIPT_DIR}/skills"
[ -z "" ] && export MEMEX_DIR="/home/user/memex" [ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex"
exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(ql:quickload :opencortex/tui)' --eval '(opencortex.tui:main)' exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(ql:quickload :opencortex/tui)' --eval '(opencortex.tui:main)'
;; ;;
cli) cli)
if ! nc -z 2>/dev/null; then if ! nc -z $HOST $PORT 2>/dev/null; then
echo -e "Brain is offline. Awakening..." echo -e "Brain is offline. Awakening..."
"/opencortex.sh" --boot > "/brain.log" 2>&1 & "$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 &
for i in {1..15}; do for i in {1..15}; do
sleep 2 sleep 2
if nc -z 2>/dev/null; then break; fi if nc -z $HOST $PORT 2>/dev/null; then break; fi
echo -n "." echo -n "."
done done
echo "" echo ""
@@ -218,7 +218,7 @@ case "" in
;; ;;
*) *)
echo -e "Unknown command: " echo -e "Unknown command: $COMMAND"
echo "Available commands: setup, boot, tui, cli" echo "Available commands: setup, boot, tui, cli"
exit 1 exit 1
;; ;;

View File

@@ -154,48 +154,48 @@ setup_system() {
# --- 3. COMMAND ROUTER --- # --- 3. COMMAND ROUTER ---
# By default, if no arguments are provided, we assume the user wants the CLI fallback. # By default, if no arguments are provided, we assume the user wants the CLI fallback.
COMMAND="cli" COMMAND=${1:-"cli"}
# However, if the system is completely uninitialized, we force the 'setup' command. # However, if the system is completely uninitialized, we force the 'setup' command.
if [ ! -f "/src/package.lisp" ] || [ ! -f "/.env" ]; then if [ ! -f "$SCRIPT_DIR/src/package.lisp" ] || [ ! -f "$SCRIPT_DIR/.env" ]; then
COMMAND="setup" COMMAND="setup"
fi fi
case "" in case "$COMMAND" in
setup) setup)
setup_system setup_system
;; ;;
--boot|boot) --boot|boot)
export SKILLS_DIR="/skills" export SKILLS_DIR="${SCRIPT_DIR}/skills"
[ -z "" ] && export MEMEX_DIR="/home/user/memex" [ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex"
exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* "FATAL LISP ERROR: ~a~%" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(format t "--- Quickloading OpenCortex ---~%")' --eval "(ql:quickload '(:opencortex :croatoan))" --eval '(opencortex:main)' exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* "FATAL LISP ERROR: ~a~%" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(format t "--- Quickloading OpenCortex ---~%")' --eval "(ql:quickload '(:opencortex :croatoan))" --eval '(opencortex:main)'
;; ;;
tui) tui)
if ! nc -z 2>/dev/null; then if ! nc -z $HOST $PORT 2>/dev/null; then
echo -e "Brain is offline. Awakening..." echo -e "Brain is offline. Awakening..."
"/opencortex.sh" --boot > "/brain.log" 2>&1 & "$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 &
for i in {1..15}; do for i in {1..15}; do
sleep 2 sleep 2
if nc -z 2>/dev/null; then break; fi if nc -z $HOST $PORT 2>/dev/null; then break; fi
echo -n "." echo -n "."
done done
echo "" echo ""
fi fi
echo -e "Launching Croatoan TUI..." echo -e "Launching Croatoan TUI..."
export SKILLS_DIR="/skills" export SKILLS_DIR="${SCRIPT_DIR}/skills"
[ -z "" ] && export MEMEX_DIR="/home/user/memex" [ -z "$MEMEX_DIR" ] && export MEMEX_DIR="$HOME/memex"
exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(ql:quickload :opencortex/tui)' --eval '(opencortex.tui:main)' exec sbcl --eval '(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))' --eval '(push (truename (uiop:getenv "SCRIPT_DIR")) asdf:*central-registry*)' --eval '(ql:quickload :opencortex/tui)' --eval '(opencortex.tui:main)'
;; ;;
cli) cli)
if ! nc -z 2>/dev/null; then if ! nc -z $HOST $PORT 2>/dev/null; then
echo -e "Brain is offline. Awakening..." echo -e "Brain is offline. Awakening..."
"/opencortex.sh" --boot > "/brain.log" 2>&1 & "$SCRIPT_DIR/opencortex.sh" --boot > "$SCRIPT_DIR/brain.log" 2>&1 &
for i in {1..15}; do for i in {1..15}; do
sleep 2 sleep 2
if nc -z 2>/dev/null; then break; fi if nc -z $HOST $PORT 2>/dev/null; then break; fi
echo -n "." echo -n "."
done done
echo "" echo ""
@@ -208,7 +208,7 @@ case "" in
;; ;;
*) *)
echo -e "Unknown command: " echo -e "Unknown command: $COMMAND"
echo "Available commands: setup, boot, tui, cli" echo "Available commands: setup, boot, tui, cli"
exit 1 exit 1
;; ;;