diff options
Diffstat (limited to 'is_built')
-rwxr-xr-x | is_built | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3,7 +3,10 @@ # Checks for package, if -T returns non-zero output, egrep will return 0 # because it finds it, so we negate the value to say it's not built. +# -Sp works backwards, it will print output only when the package already +# exists # Example usage: is_built "pcre>=20" -!(sudo pacman -T "$1" | egrep "*" >/dev/null) +!(sudo pacman -T "$1" | egrep "*" >/dev/null) || \ +sudo pacman -Sp "$1" --print-format "%n-%v" 2>/dev/null | egrep "*" >/dev/null exit $? |