17 lines
556 B
Bash
17 lines
556 B
Bash
#!/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 "$@" |