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
1 changed files with 2 additions and 1 deletions

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}