Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--checkpkg9
1 files changed, 8 insertions, 1 deletions
diff --git a/checkpkg b/checkpkg
index 9f8d9fc..f2d3bf4 100644
--- a/checkpkg
+++ b/checkpkg
@@ -16,7 +16,14 @@ if [ ! -f $pkgname-$pkgver-$pkgrel.pkg.tar.gz ]; then
exit 1
fi
-pkgurl=`pacman -Sp --noconfirm $pkgname | rev | cut -d ' ' -f 1 | rev`
+tmp=`pacman -Sp --noconfirm $pkgname`
+
+if [ $? -ne 0 ]; then
+ echo "Couldn't download previous package."
+ exit 1
+fi
+
+pkgurl=`echo $tmp | rev | cut -d ' ' -f 1 | rev`
oldpkg=`strip_url $pkgurl`