feat(brew): Automatically install and maintain brew package list (#347)#348
feat(brew): Automatically install and maintain brew package list (#347)#348mecattaf wants to merge 1 commit intoblue-build:mainfrom mecattaf:brew-improvement
Conversation
fiftydinar
left a comment
There was a problem hiding this comment.
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.
| 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.
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.
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.
|
FYI I will not be working on this module further because I have found that the only program offered by homebrew ( |
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