From a17ba41e179b44868c0935b935f41b40a99ae06c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 18 Dec 2008 11:40:56 +0100 Subject: [PATCH] binpkg-genindex.sh: be sure there are binpkgs before starting. --HG-- extra : convert_revision : 451c8924fdd71dfc020cf5a4f068d564b66de981 --- utils/sh/binpkg-genindex.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/sh/binpkg-genindex.sh b/utils/sh/binpkg-genindex.sh index c83111dc526..fcefc35bd83 100644 --- a/utils/sh/binpkg-genindex.sh +++ b/utils/sh/binpkg-genindex.sh @@ -35,9 +35,15 @@ write_repo_pkgindex() local pkgindexf= local tmppkgdir= local i= + local found= [ ! -d $XBPS_PACKAGESDIR ] && exit 1 + found="$(echo $XBPS_PACKAGESDIR/*)" + if $(echo $found|grep -vq .xbps); then + msg_error "couldn't find binary packages on $XBPS_PACKAGESDIR." + fi + pkgindexf=$(mktemp -t pkgidx.XXXXXXXXXX) || exit 1 tmppkgdir=$(mktemp -d -t pkgdir.XXXXXXXX) || exit 1