summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-04-14 14:26:43 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-04-14 14:26:43 -0300
commit47970ad081939c1024a2a9358e647ed2358f6de6 (patch)
tree3dba3bfa0eb0bfb4a56cc83a7a331776abdb8603
parent1a0d07ee6f649fa515236ee58830a864bb65e661 (diff)
Remote version checking
-rwxr-xr-xis_built5
1 files changed, 4 insertions, 1 deletions
diff --git a/is_built b/is_built
index 52888ce..f789e4f 100755
--- a/is_built
+++ b/is_built
@@ -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 $?