From: cajus Date: Wed, 27 Feb 2008 10:52:43 +0000 (+0000) Subject: Updated class cache generation to work with the target location X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e8d0656454ab4cb86a8d48e522ef8840c6ba83b9;p=gosa.git Updated class cache generation to work with the target location git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9165 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/debian/rules b/gosa-core/debian/rules index d9683996d..db79e19f3 100755 --- a/gosa-core/debian/rules +++ b/gosa-core/debian/rules @@ -112,8 +112,9 @@ install-stamp: sed -i "s%require(\"smarty/Smarty.class.php\");%require(\"${SMARTY_LOCATION}/Smarty.class.php\");%g" debian/gosa/usr/share/gosa/include/php_setup.inc # Configure update location - sed -i 's%include/class_location.inc%/etc/gosa/classes%g' debian/gosa/usr/sbin/update-gosa - sed -i 's%$class_mapping= get_classes();%$class_mapping= get_classes("/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa + sed -i 's%^define.*__FILE__.*%define ("GOSA_HOME", "/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa + sed -i 's%GOSA_HOME.*include/class_location.inc%"/etc/gosa/classes%g' debian/gosa/usr/sbin/update-gosa + sed -i 's%class_mapping= get_classes();%class_mapping= get_classes("/usr/share/gosa");%g' debian/gosa/usr/sbin/update-gosa sed -i 's%class_location.inc%/etc/gosa/classes%g' debian/gosa/usr/share/gosa/include/functions.inc # Fix permissions diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa index 186947d5a..a4f418e1f 100755 --- a/gosa-core/update-gosa +++ b/gosa-core/update-gosa @@ -48,7 +48,11 @@ function get_classes($folder= ".") static $result= array(); if ($base_dir == ""){ - $base_dir= getcwd(); + if ($folder == "."){ + $base_dir= getcwd(); + } else { + $base_dir= $folder; + } } $currdir=getcwd();