mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-07 01:06:38 +00:00
fix(brew-update-service): install serviceman as needed
This commit is contained in:
@@ -6,15 +6,23 @@ main() { (
|
||||
sed '1,/^#~\/.local\/bin\/brew-updater/d' "${0}" > ~/.local/bin/brew-update-hourly
|
||||
chmod a+x ~/.local/bin/brew-update-hourly
|
||||
|
||||
echo "Checking for serviceman..."
|
||||
if ! command -v serviceman > /dev/null; then
|
||||
"$HOME/.local/bin/webi" serviceman
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
serviceman --version
|
||||
fi
|
||||
|
||||
env PATH="$PATH" serviceman add --user \
|
||||
--workdir ~/.local/opt/brew/ \
|
||||
--name sh.brew.updater -- \
|
||||
~/.local/bin/brew-update-hourly
|
||||
); }
|
||||
|
||||
if main; then
|
||||
exit 0
|
||||
if ! main; then
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
|
||||
#~/.local/bin/brew-updater
|
||||
#!/bin/sh
|
||||
|
||||
Reference in New Issue
Block a user