deb-update.bash: hack in homebrew updates through systemd unit

This commit is contained in:
Aminda Suomalainen 2025-07-28 07:48:21 +03:00
parent ce265a651c
commit aa8cd81e55
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723

View File

@ -71,7 +71,12 @@ if hash pacman 2> /dev/null; then
fi
# https://github.com/Homebrew/brew
if [[ -d /home/linuxbrew/.linuxbrew/bin && $(id -u) != 0 ]]; then
if [[ -f /etc/systemd/system/linuxbrew-update.timer && $(id -u) == 0 ]]; then
if hash systemctl 2> /dev/null; then
systemctl enable linuxbrew-update.timer
systemctl start linuxbrew-update.service
fi
elif [[ -d /home/linuxbrew/.linuxbrew/bin && $(id -u) != 0 ]]; then
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
export HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar
export HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew