aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2012-02-18 15:00:13 +0100
committerLaurent Bachelier <laurent@bachelier.name>2012-02-18 15:00:13 +0100
commit341a262900146410f65f88c5ba7413a8f5e69010 (patch)
treee279d55605ab53e6366c61813fe652a2da376eeb
parentForce expiration of everything (diff)
downloadsymfttpd-341a262900146410f65f88c5ba7413a8f5e69010.tar.xz
Add support for a different data path
This is useful for PEAR-based installs.
-rwxr-xr-xmksymlinks16
-rw-r--r--symfttpd.conf.php13
2 files changed, 24 insertions, 5 deletions
diff --git a/mksymlinks b/mksymlinks
index fee8192..03f0a4a 100755
--- a/mksymlinks
+++ b/mksymlinks
@@ -78,18 +78,24 @@ if ($options['genconf'])
}
$sf_path = $options['sf_path'][$options['want']];
+$sf_data_path = $options['sf_data_path'][$options['want']]
+ ? $options['sf_data_path'][$options['want']]
+ : $options['sf_path'][$options['want']].'/data';
foreach (array(
- 'symfony_symlink' => '',
- 'lib_symlink' => 'lib',
- 'data_symlink' => 'data',
- 'web_symlink' => 'data/web/sf',
+ 'symfony_symlink' => '%sf_path%',
+ 'lib_symlink' => '%sf_path%/lib',
+ 'data_symlink' => '%sf_data_path%',
+ 'web_symlink' => '%sf_data_path%/web/sf',
)
as $option => $relpath)
{
$link = $options[$option];
if ($link)
{
- $target = $sf_path.'/'.$relpath;
+ $target = str_replace(
+ array('%sf_path%', '%sf_data_path%'),
+ array($sf_path, $sf_data_path),
+ $relpath);
if (!is_dir($target))
{
throw new Exception($target.' is not a directory');
diff --git a/symfttpd.conf.php b/symfttpd.conf.php
index 7c7872a..4095165 100644
--- a/symfttpd.conf.php
+++ b/symfttpd.conf.php
@@ -87,6 +87,19 @@ $options['sf_path'] = array(
'1.4'=>getenv('HOME').'/Dev/symfony/1.4',
);
+/**
+ * symfony data paths
+ * If not provided, it will be based on the data dir of sf_path
+ * @var array version=>path
+ */
+$options['sf_data_path'] = array(
+ '1.0'=>false,
+ '1.1'=>false,
+ '1.2'=>false,
+ '1.3'=>false,
+ '1.4'=>false,
+);
+
// }}}
// {{{ spawn configuration