binpkg-genindex.sh: be sure there are binpkgs before starting.

--HG--
extra : convert_revision : 451c8924fdd71dfc020cf5a4f068d564b66de981
This commit is contained in:
Juan RP 2008-12-18 11:40:56 +01:00
parent f19afb5fe0
commit a17ba41e17

View file

@ -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