about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-03-25 14:10:52 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-03-25 14:10:52 +0100
commit6bc8e434bf988029c63c26c94e633278e96261b2 (patch)
tree4b2004501a379198980269fb2d2bf6da8d2109cf
parent2dea56a515909504430ea0a7179e1e349458cdb1 (diff)
downloadxtools-6bc8e434bf988029c63c26c94e633278e96261b2.tar.gz
xtools-6bc8e434bf988029c63c26c94e633278e96261b2.tar.xz
xtools-6bc8e434bf988029c63c26c94e633278e96261b2.zip
xbump: fail when ./xbps-src show errors.
-rwxr-xr-xxbump5
1 files changed, 5 insertions, 0 deletions
diff --git a/xbump b/xbump
index 865d5d0..8276fb2 100755
--- a/xbump
+++ b/xbump
@@ -7,6 +7,11 @@ pkg=$1; shift
 [ -z "$pkg" ] && pkg=$(basename $PWD)
 version=$(./xbps-src show "$pkg" | sed -n '/^version/s/[^:]*:[\t]*//p')
 
+if [ -z "$version" ]; then
+	echo cannot parse version
+	exit 1
+fi
+
 if [ -n "$(git ls-files srcpkgs/"$pkg"/template)" ]; then
 	msg="$pkg: update to $version."
 else