public function setChannelDirectory(&$options)
{
if (empty($options['channelxmlpath'])) {
$options['channelxmlpath'] = $options['destination'] . '/distribution/channels';
if (!file_exists($options['channelxmlpath'])) {
if (!empty($options['build_distribution'])) {
mkdir($options['channelxmlpath'], 0777, true);
} else {
unset($options['channelxmlpath']);
}
}
}
if (empty($options['channelxmlpath']) && !empty($this->_source_directory)) {
$options['channelxmlpath'] = $this->_source_directory;
}
if (!empty($options['channelxmlpath'])) {
if (!file_exists($options['channelxmlpath'])) {
throw new Components_Exception(sprintf('The path to the channel directory (%s) does not exist!', $options['channelxmlpath']));
}
$this->_channel_directory = $options['channelxmlpath'];
}
}