From 1e445fe096679f36e53bf3561e912ca31d12cf42 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 31 Oct 2014 21:24:07 +0100 Subject: [PATCH] xbps-src: update-check: return if curl not available; simplify output for match. --- common/xbps-src/shutils/update_check.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh index cb6ef2d7cb5..77f72eca3ca 100644 --- a/common/xbps-src/shutils/update_check.sh +++ b/common/xbps-src/shutils/update_check.sh @@ -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