diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-07-06 22:38:45 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-07-06 22:38:45 -0600 |
commit | f63ad6177a137ccc1c410acca75192d7ca369ecc (patch) | |
tree | 233a58357220e1fa1772898f4a89c95dc0508d06 /packages.sh | |
parent | 700e3cf27dcddac84632bcfed3d27ef36cb43df5 (diff) |
Diffstat (limited to 'packages.sh')
-rwxr-xr-x | packages.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages.sh b/packages.sh index c79d58c..d685149 100755 --- a/packages.sh +++ b/packages.sh @@ -12,8 +12,12 @@ fi packages_txt() { { - pacman -Sgq -- "${grps[@]}"|grep -vFx -f <(printf '%s\n' "${excl[@]}") - printf '%s\n' "${pkgs[@]}" + if [[ ${#grps[@]} -gt 0 ]]; then + pacman -Sgq -- "${grps[@]}"|grep -vFx -f <(printf '%s\n' "${excl[@]}") + fi + if [[ ${#pkgs[@]} -gt 0 ]]; then + printf '%s\n' "${pkgs[@]}" + fi } | sort -u } |