-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(brew): Automatically install and maintain brew package list (#347) #348
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial thoughts before fully testing this
if [[ -n "${INSTALL_PACKAGES}" ]]; then | ||
echo "install:" > /usr/share/bluebuild/brew/repo-info.yml | ||
echo "${INSTALL_PACKAGES}" | sed 's/^/ - /' >> /usr/share/bluebuild/brew/repo-info.yml | ||
echo "The following Brew packages will be installed when the system is live:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "The following Brew packages will be installed when the system is live:" | |
echo "The following Brew packages will be installed when system is booted:" |
Description=Setup Brew Packages | ||
After=brew-setup.service | ||
Requires=brew-setup.service | ||
ConditionPathExists=!/var/lib/brew-packages-setup.stamp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition makes this execute only once.
It should execute every boot, to install packages from updated install list over time. If there are no packages, it will just say Package \$package is already installed.
To make logs more sane in this scenario (when there are no new packages to install),
instead of printing this echo for every package, it should print once: Installed packages are up-to-date with install list, no changes need to be done
# Write brew-packages-setup script | ||
cat > /usr/bin/brew-packages-setup <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be just a file in the module's directory that is cp
'd in place. Having it inline doesn't work with syntax highlighting and shellcheck.
Let me know if you want me to make any changes, to comply with the coding standards of the modules project!
Corresponds to #347
Thanks,
T