From 767c0821ee0a1ad893efe9b5bc8e84f5629f8416 Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Fri, 4 Nov 2022 21:43:06 +0100 Subject: scripts: removed bashisms --- .local/bin/aurignored | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.local/bin/aurignored') diff --git a/.local/bin/aurignored b/.local/bin/aurignored index 0db9148..efb12f7 100755 --- a/.local/bin/aurignored +++ b/.local/bin/aurignored @@ -1,10 +1,10 @@ #!/bin/sh # Get list of ignored pkgs -function ignored() { +ignored() { pkgs="$(grep IgnorePkg /etc/pacman.conf | sed -e 's/IgnorePkg =//' -e 's/#.*//')" grps="$(grep IgnoreGroup /etc/pacman.conf | sed -e 's/IgnoreGroup =//' -e 's/#.*//')" - [[ -n $grps ]] && pkgs="$pkgs $(pacman -Sgq $grps)" + [ -n "$grps" ] && pkgs="$pkgs $(pacman -Sgq "$grps")" echo -n "$pkgs" | tail -n -1 } @@ -12,5 +12,5 @@ function ignored() { # Return only AUR pkgs for pkg in $(ignored) do - pacman -Si $pkg &>/dev/null || echo "$pkg" + pacman -Si "$pkg" >/dev/null 2>&1 || echo "$pkg" done -- cgit v1.2.3-70-g09d2