blob: 52888ce9898b032004c81ab37f919b7172b2f5e7 (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/bash
# Detect is a package is installed or in a database
# 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.
# Example usage: is_built "pcre>=20"
!(sudo pacman -T "$1" | egrep "*" >/dev/null)
exit $?
|