.

gyro/modules/console/install/install.php File Reference

Go to the source code of this file.

Functions

  console_install ()
  Copy example files to app directory.

Function Documentation

console_install (  ) 

Copy example files to app directory.

You may want to change modes or file name afterwards

Definition at line 7 of file install.php.

00007                            {
00008         $ret = new Status();
00009         $target = APP_INCLUDE_ABSPATH . 'run_console.php';
00010         if (!file_exists($target)) {
00011                 $src = dirname(__FILE__) . '/run_console.php.example';
00012                 if (!copy($src, $target)) {
00013                         $ret->merge(tr('Could not create %target. Please do it manually', 'console', array('%target' => $target)));
00014                 }
00015                 else {
00016                         if (!chmod($target, 0744)) {
00017                                 $ret->merge(tr('Could not chmod %target to be executable', 'console', array('%target' => $target)));
00018                         }
00019                 }
00020         }
00021         return $ret;
00022 }