Add brew_entrypoint.sh
This commit is contained in:
1 parent
571ee3d5fb
commit
45c84822a6
1 file changed
+17
@@ -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 "$@"
|
||||||
Reference in new issue
Block a user