xbps-src: do not overwrite masterdir if -c not set and -m set.

This commit is contained in:
Juan RP 2010-06-03 01:49:33 +02:00
parent c81781ab0f
commit 0c5f31342c

View file

@ -171,7 +171,7 @@ check_config_vars()
msg_error "couldn't create 'XBPS_MASTERDIR' directory"
fi
fi
export _MASTERDIR="$XBPS_MASTERDIR"
[ -z "${_MASTERDIR_FLAG}" ] && export _MASTERDIR="$XBPS_MASTERDIR"
}
#
@ -183,6 +183,7 @@ while getopts "Cc:hm:p:" opt; do
c) XBPS_CONFIG_FILE="$OPTARG";;
h) usage && exit 0;;
m)
_MASTERDIR_FLAG=1
_MASTERDIR="$OPTARG"
if [ ! -d ${_MASTERDIR} ]; then
mkdir -p ${_MASTERDIR}