diff options
| author | srdusr <trevorgray@srdusr.com> | 2024-06-20 17:28:19 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2024-06-20 17:28:19 +0200 |
| commit | 92fb0b78a1a32be142eeed218daf585bec7c741c (patch) | |
| tree | 2cb4bd5775b9624abdc09e469ffde96cd40cbbfb /install.sh | |
| parent | b67ee68edd42c673ec4ca1be53239dd665ed9d6d (diff) | |
| download | dotfiles-92fb0b78a1a32be142eeed218daf585bec7c741c.tar.gz dotfiles-92fb0b78a1a32be142eeed218daf585bec7c741c.zip | |
Testing
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -625,16 +625,19 @@ linux_install_packages() { ;; "PORTAGE") # Try installing packages with emerge for Gentoo - local gentoo_packages=("$(yq e '.linux.gentoo[]' "$packages_file" 2>/dev/null)") + local gentoo_packages=("$(yq e '.linux.gentoo[]' "$packages_file" 2>/dev/null | grep -v '^$')") for package in "${gentoo_packages[@]}"; do - if ! equery list "$package" &>/dev/null; then - if ! "$PRIVILEGE_TOOL" emerge --ask "$package"; then - failed_packages+=("$package") - any_failures=true # Set flag to true if any package fails to install + if [ "$package" != "" ]; then # Check if package name is not empty + if ! equery list "$package" &>/dev/null; then + if ! "$PRIVILEGE_TOOL" emerge --ask "$package"; then + failed_packages+=("$package") + any_failures=true # Set flag to true if any package fails to install + fi fi fi done ;; + *) echo "Package manager not supported." return 1 |
