diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index 06e77bcea5c..9795196473a 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -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}