Skip to content

Commit

Permalink
Add option to specify framework location.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jan 21, 2015
1 parent 3cdfa98 commit 711bcb3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 10 additions & 3 deletions framework/bin/install_dev
Expand Up @@ -20,11 +20,11 @@ array_shift($argv);
/* Defaults */
$apps = array();
$debug = $git = $no_framework = false;
$horde_git = $static_group = $web_dir = '';
$framework = $horde_git = $static_group = $web_dir = '';
$static_mode = 0775;

if (count($argv)) {
$options = $c->getopt2($argv, '', array('apps=', 'config=', 'debug', 'git', 'group=', 'hordegit=', 'mode=', 'noframework=', 'webdir='));
$options = $c->getopt2($argv, '', array('apps=', 'config=', 'debug', 'framework=', 'git', 'group=', 'hordegit=', 'mode=', 'noframework=', 'webdir='));
if ($options instanceof PEAR_Error) {
exit("Invalid arguments.\n");
}
Expand All @@ -43,6 +43,10 @@ if (count($argv)) {
$debug = (bool)$val[1];
break;

case '--framework':
$framework = $val[1];
break;

case '--git':
$git = (bool)$val[1];
break;
Expand Down Expand Up @@ -74,6 +78,9 @@ if (count($argv)) {

$horde_git = rtrim(ltrim($horde_git), '/ ');
$web_dir = rtrim(ltrim($web_dir), '/ ');
if (!$framework) {
$framework = escapeshellarg($horde_git) . '/framework';
}

if ($git && ($git === true)) {
$git = 'git fetch && ( git rebase -v origin || ( git stash && ( git rebase -v origin || echo "WARNING: Run \'git stash pop\' manually!" ) && git stash pop ) )';
Expand Down Expand Up @@ -197,5 +204,5 @@ if ($apps) {
if (!$no_framework) {
print "\nLINKING framework\n";
mkdir($web_dir . '/libs');
system(__DIR__ . '/install_framework --src ' . escapeshellarg($horde_git) . '/framework --dest ' . escapeshellarg($web_dir . '/libs') . ' --horde ' . escapeshellarg($web_dir));
system(__DIR__ . '/install_framework --src ' . $framework . ' --dest ' . escapeshellarg($web_dir . '/libs') . ' --horde ' . escapeshellarg($web_dir));
}
3 changes: 3 additions & 0 deletions framework/bin/install_dev.conf.dist
Expand Up @@ -17,6 +17,9 @@ $no_framework = false;
// The location of the horde-git repository
$horde_git = '';

// The location of the framework to install
// $framework = '';

// The web-accessible base directory for horde
$web_dir = '';

Expand Down

0 comments on commit 711bcb3

Please sign in to comment.