Files
fluffy-pancake/files/usr/local/bin/install-homebrew.sh
T

19 lines
495 B
Bash
Raw Normal View History

2026-03-14 14:36:01 +01:00
#!/usr/bin/env bash
set -euo pipefail
2026-03-14 14:36:01 +01:00
USER="$1"
2026-03-15 17:59:18 +01:00
HOME="/var/home/$USER"
export HOME
export NONINTERACTIVE=1
2026-03-14 14:36:01 +01:00
2026-03-15 17:59:18 +01:00
# Homebrew installieren (als User, aber ohne Interaktion)
2026-03-16 11:20:27 +01:00
HOME="$HOME" NONINTERACTIVE=1 bash -c '
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" --prefix="$HOME/.linuxbrew"
'
2026-03-15 17:59:18 +01:00
# Optional: Brew in PATH eintragen
if ! grep -q 'linuxbrew' "$HOME/.bashrc"; then
2026-03-16 11:20:27 +01:00
echo 'eval "$($HOME/.linuxbrew/bin/brew shellenv)"' >> "$HOME/.bashrc"
fi
2026-03-16 11:20:27 +01:00