summaryrefslogtreecommitdiff
path: root/is_built
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-11-07 00:17:08 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-11-07 00:17:08 -0500
commite9bc885c355babf7851de31db8e1920dde752993 (patch)
treefd39b7d6401ead53942f66bfc4219a06f386a23f /is_built
parentc74d072dc83c5e3b3d9462678884cd0411a7d1d0 (diff)
organize the files
Diffstat (limited to 'is_built')
-rwxr-xr-xis_built36
1 files changed, 0 insertions, 36 deletions
diff --git a/is_built b/is_built
deleted file mode 100755
index 1fa79d2..0000000
--- a/is_built
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-usage() {
- echo "$0 "
- echo
- echo "Detect if a given package version is already in repos"
- echo "Assuming you want greater or equal"
- echo
- echo "Example usage: is_built 'pcre' '20'"
-}
-
-while getopts 'h' arg; do
- case $arg in
- h) usage; exit 0 ;;
- *) usage; exit 1 ;;
- esac
-done
-
-ver=${2}
-pkg=${1}
-pver=$(LC_ALL=C pacman -Sddp --print-format "%v" "${pkg}" 2>/dev/null)
-
-# if pacman fails or returns nothing
-r=$?
-[ "${pver}" = " there is nothing to do" ] && r=1
-
-result=$(vercmp "${pver}" "${ver}")
-
-# if vercmp > 1 means our version is bigger
-if [ ${result} -ge 0 -a ${r} -eq 0 ]; then
- exit 0
-else
- exit 1
-fi
-
-# just in case
-exit 1