From 0c5f31342c18a3b4141897dad9aaf5a8d9191316 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 3 Jun 2010 01:49:33 +0200 Subject: [PATCH] xbps-src: do not overwrite masterdir if -c not set and -m set. --- xbps-src/xbps-src.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}