xbps-src: update-check: return if curl not available; simplify output for match.

This commit is contained in:
Juan RP 2014-10-31 21:24:07 +01:00
parent b3e210198d
commit 1e445fe096
1 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,12 @@
update_check() {
local i p url rx found_version consider
if ! command -v curl &>/dev/null; then
echo "ERROR: cannot find \`curl' executable!"
return 1
fi
export LC_ALL=C
: ${update_pkgname:=$pkgname}
@ -66,7 +72,7 @@ update_check() {
if $consider; then
xbps-uhelper cmpver "$pkgname-${version}_1" "$pkgname-${found_version}_1"
if [ $? = 255 ]; then
echo "NEWER VERSION $pkgname-$found_version (have $pkgname-${version})"
echo "${pkgname}-${version} -> ${pkgname}-${found_version}"
fi
fi
done