init_funcs.sh::set_defvars() bailout if required dirs cannot be found.
This commit is contained in:
parent
71aa49c397
commit
9615930eb4
|
@ -42,18 +42,21 @@ set_defvars()
|
|||
: ${XBPS_BUILDDIR:=$XBPS_MASTERDIR/pkg-builddir}
|
||||
: ${XBPS_SRCDISTDIR:=$XBPS_MASTERDIR/pkg-srcdistdir}
|
||||
|
||||
DDIRS="TRIGGERSDIR HELPERSDIR SRCPKGDIR COMMONVARSDIR SHUTILSDIR"
|
||||
DDIRS="$DDIRS DISTRIBUTIONDIR"
|
||||
for i in ${DDIRS}; do
|
||||
eval val="\$XBPS_$i"
|
||||
if [ ! -d "$val" ]; then
|
||||
echo "ERROR: cannot find $i at $val aborting."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for i in DESTDIR PACKAGESDIR BUILDDIR SRCDISTDIR; do
|
||||
eval val="\$XBPS_$i"
|
||||
[ ! -d "$val" ] && mkdir -p $val
|
||||
done
|
||||
|
||||
DDIRS="XBPS_TRIGGERSDIR XBPS_HELPERSDIR"
|
||||
DDIRS="$DDIRS XBPS_COMMONVARSDIR XBPS_SHUTILSDIR"
|
||||
for i in ${DDIRS}; do
|
||||
eval val="\$$i"
|
||||
[ ! -d "$val" ] && msg_error "cannot find $i, aborting."
|
||||
done
|
||||
|
||||
export XBPS_PKGDB_CMD="xbps-uhelper.static -r $XBPS_MASTERDIR"
|
||||
export XBPS_BIN_CMD="xbps-bin.static -r $XBPS_MASTERDIR"
|
||||
export XBPS_DIGEST_CMD="xbps-uhelper.static digest"
|
||||
|
|
Loading…
Reference in New Issue