summaryrefslogtreecommitdiff
path: root/.local/bin/aurignored
diff options
context:
space:
mode:
authoradam <56338480+adastx@users.noreply.github.com>2022-11-04 21:43:06 +0100
committeradam <56338480+adastx@users.noreply.github.com>2022-11-04 21:43:06 +0100
commit767c0821ee0a1ad893efe9b5bc8e84f5629f8416 (patch)
treeb3b8b619dd99f020f41f54fa1186421901d78fd0 /.local/bin/aurignored
parentbb2359c30f8ade19fc7e60ab825d2744d0c04fcf (diff)
scripts: removed bashisms
Diffstat (limited to '.local/bin/aurignored')
-rwxr-xr-x.local/bin/aurignored6
1 files changed, 3 insertions, 3 deletions
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