git.cweiske.de
/
phorkie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
979fd71
)
handle default git+workdir in phar files
author
Christian Weiske
<cweiske@cweiske.de>
Fri, 4 Jul 2014 05:34:10 +0000
(07:34 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Fri, 4 Jul 2014 05:34:10 +0000
(07:34 +0200)
data/config.default.php
patch
|
blob
|
history
diff --git
a/data/config.default.php
b/data/config.default.php
index eb98efd7076a12d5fe45736cb1bc3b5216d20c0f..22bbc4a7eba573d52b94a794ac6011210a9c2fca 100644
(file)
--- a/
data/config.default.php
+++ b/
data/config.default.php
@@
-1,8
+1,16
@@
<?php
<?php
+$pharFile = \Phar::running();
+if ($pharFile == '') {
+ $phorkieDir = __DIR__ . '/../';
+} else {
+ //remove phar:// from the path
+ $phorkieDir = dirname(substr($pharFile, 7)) . '/';
+}
+
$GLOBALS['phorkie']['cfg'] = array(
'debug' => false,
$GLOBALS['phorkie']['cfg'] = array(
'debug' => false,
- 'gitdir' =>
__DIR__ . '/../
repos/git/',
- 'workdir' =>
__DIR__ . '/../
repos/work/',
+ 'gitdir' =>
$phorkieDir . '
repos/git/',
+ 'workdir' =>
$phorkieDir . '
repos/work/',
'tpl' => __DIR__ . '/templates/',
'baseurl' => null,
'avatars' => true,
'tpl' => __DIR__ . '/templates/',
'baseurl' => null,
'avatars' => true,