Update brew-entrypoint.sh

This commit is contained in:
da7e committed 2026-10-02 17:12:17 +02:00
1 parent 768d488183
commit 30797c5ce5
1 file changed
+17
View File
@@ -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 "$@"