@@ -77,4 +77,42 @@ for unit in "${IMPORTANT_UNITS[@]}"; do
7777 fi
7878done
7979
80+ # Test Homebrew installation files
81+ echo " Testing Homebrew installation files..."
82+
83+ # Test that the homebrew installer script exists and is executable
84+ test -f /usr/share/ublue-os/homebrew-install.sh || { echo " Missing homebrew installer script" ; exit 1; }
85+ test -x /usr/share/ublue-os/homebrew-install.sh || { echo " Homebrew installer script is not executable" ; exit 1; }
86+
87+ # Test that all systemd service files exist
88+ HOMEBREW_SYSTEMD_FILES=(
89+ /usr/lib/systemd/system/brew-setup.service
90+ /usr/lib/systemd/system/brew-update.service
91+ /usr/lib/systemd/system/brew-update.timer
92+ /usr/lib/systemd/system/brew-upgrade.service
93+ /usr/lib/systemd/system/brew-upgrade.timer
94+ /usr/lib/systemd/system-preset/01-homebrew.preset
95+ )
96+
97+ for file in " ${HOMEBREW_SYSTEMD_FILES[@]} " ; do
98+ test -f " $file " || { echo " Missing systemd file: ${file} " ; exit 1; }
99+ done
100+
101+ # Test that shell integration files exist
102+ HOMEBREW_SHELL_FILES=(
103+ /etc/profile.d/brew.sh
104+ /etc/profile.d/brew-bash-completion.sh
105+ /usr/share/fish/vendor_conf.d/ublue-brew.fish
106+ )
107+
108+ for file in " ${HOMEBREW_SHELL_FILES[@]} " ; do
109+ test -f " $file " || { echo " Missing shell integration file: ${file} " ; exit 1; }
110+ done
111+
112+ # Test that system configuration files exist
113+ test -f /usr/lib/tmpfiles.d/homebrew.conf || { echo " Missing tmpfiles.d/homebrew.conf" ; exit 1; }
114+ test -f /etc/security/limits.d/30-brew-limits.conf || { echo " Missing limits.d/30-brew-limits.conf" ; exit 1; }
115+
116+ echo " All Homebrew installation files present and valid"
117+
80118echo " ::endgroup::"
0 commit comments