From aa8cd81e551a77c2b9b078173c23a913c745087b Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 28 Jul 2025 07:48:21 +0300 Subject: [PATCH] deb-update.bash: hack in homebrew updates through systemd unit --- bash/deb-update.bash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bash/deb-update.bash b/bash/deb-update.bash index 329bdfc..aaf75f6 100755 --- a/bash/deb-update.bash +++ b/bash/deb-update.bash @@ -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