[gpdemo] only create mirror directories when needed
When `"${WITH_MIRRORS}" != "true"`, do not create the mirror directories
since no segment will be created in that directory.
@@ -259,9 +259,11 @@ do
mkdir -p $PRIMARY_DIR
PRIMARY_DIRS_LIST="$PRIMARY_DIRS_LIST $PRIMARY_DIR"
+ if [ "${WITH_MIRRORS}" == "true" ]; then
MIRROR_DIR=$DATADIRS/dbfast_mirror$i
mkdir -p $MIRROR_DIR
MIRROR_DIRS_LIST="$MIRROR_DIRS_LIST $MIRROR_DIR"
+ fi
done
PRIMARY_DIRS_LIST=${PRIMARY_DIRS_LIST#* }
MIRROR_DIRS_LIST=${MIRROR_DIRS_LIST#* }
