From 45c84822a6f7bb51f2412e04e1e4621fed00a388 Mon Sep 17 00:00:00 2001 From: David GAILLETON Date: Fri, 2 Oct 2026 17:11:40 +0200 Subject: [PATCH] Add brew_entrypoint.sh --- brew_entrypoint.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 brew_entrypoint.sh diff --git a/brew_entrypoint.sh b/brew_entrypoint.sh new file mode 100644 index 0000000..5fd36f8 --- /dev/null +++ b/brew_entrypoint.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Installs Homebrew into the mounted volume the first time the container starts, +# then hands off to the normal OpenClaw command. +set -e + +BREW_PREFIX=/home/linuxbrew/.linuxbrew + +if [ ! -x "$BREW_PREFIX/bin/brew" ]; then + echo "[brew] First start: installing Homebrew into $BREW_PREFIX" + mkdir -p "$BREW_PREFIX/bin" + git clone --depth=1 https://github.com/Homebrew/brew "$BREW_PREFIX/Homebrew" + ln -sf ../Homebrew/bin/brew "$BREW_PREFIX/bin/brew" + "$BREW_PREFIX/bin/brew" update --force --quiet + echo "[brew] Done." +fi + +exec "$@" \ No newline at end of file