diff options
-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 } |