diff --git a/build/build.properties b/build/build.properties index 588b7c122..50915fb41 100644 --- a/build/build.properties +++ b/build/build.properties @@ -1,4 +1,6 @@ -project.home = /home/naomiaro/dev-campcaster/campcaster +#Note: project.home is automatically generated by the propel-install script. +#Any manual changes to this value will be overwritten. +project.home = /path/to/airtime project.build = ${project.home}/build #Database driver diff --git a/install/propel-install.php b/install/propel-install.php index 245ee3a3c..5b798c712 100644 --- a/install/propel-install.php +++ b/install/propel-install.php @@ -31,19 +31,19 @@ if(exec("whoami") != "root"){ $property = 'project.home'; $lines = file('../build/build.properties'); -foreach ($lines as $line) { +foreach ($lines as $key => &$line) { if ($property == substr($line, 0, strlen($property))){ - $indexOfEquals = strpos($line, '='); - if ($indexOfEquals !== false){ - $dir_value = trim(substr($line, $indexOfEquals+1)); - //check to make sure that the project.home path is equal to one level - //up of this install script location. - $dir_found = realpath(__dir__.'/../') == realpath($dir_value); - } - break; + $line = $property." = ".realpath(__dir__.'/../')."\n"; } } +$fp=fopen('../build/build.properties', 'w'); +foreach($lines as $key => $line){ + fwrite($fp, $line); +} +fclose($fp); + + if ($dir_found === false){ echo ("../build/build.properties 'project.home' value of '$dir_value' is incorrect. Please correct and try install again.\n"); exit(1);