summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-10-01 09:21:22 +0000
committeralecpl <alec@alec.pl>2008-10-01 09:21:22 +0000
commitab8b44741d3c1cf4f088bc899ed8ebb8647ac436 (patch)
tree36ef0182593476f304155a380f72db3743bf722a /bin
parentdda3c7db468dab0d5ee4a409fdf79b0832ffb743 (diff)
- Allow calling msgimport.sh/msgexport.sh from any directory (#1485431)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/msgexport.sh2
-rwxr-xr-xbin/msgimport.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/msgexport.sh b/bin/msgexport.sh
index 33d5d4b4a..b15da1feb 100755
--- a/bin/msgexport.sh
+++ b/bin/msgexport.sh
@@ -1,7 +1,7 @@
#!/usr/bin/php
<?php
-define('INSTALL_PATH', preg_replace('/bin\/$/', '', getcwd()) . '/');
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
ini_set('memory_limit', -1);
require_once INSTALL_PATH.'program/include/iniset.php';
diff --git a/bin/msgimport.sh b/bin/msgimport.sh
index 9bd97c61c..fa5678cec 100755
--- a/bin/msgimport.sh
+++ b/bin/msgimport.sh
@@ -1,7 +1,7 @@
#!/usr/bin/php
<?php
-define('INSTALL_PATH', preg_replace('/bin\/$/', '', getcwd()) . '/');
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
ini_set('memory_limit', -1);
require_once INSTALL_PATH.'program/include/iniset.php';