Skip to content

Commit

Permalink
Give command line tool the ability to be executed from any location
Browse files Browse the repository at this point in the history
  • Loading branch information
hakito committed Aug 21, 2013
1 parent 098392b commit 33c5466
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/tools/legko.php
@@ -1,9 +1,14 @@
#!/usr/bin/php -q
<?php
$cwd = dirname(__FILE__);
$sourceFolder = dirname($cwd);
$root = dirname($sourceFolder);
set_include_path(get_include_path().
PATH_SEPARATOR.realpath("../../lib/ZF/1.10.7"));
PATH_SEPARATOR.$root."/lib/ZF/1.10.7".
PATH_SEPARATOR.$sourceFolder
);

require_once '../com/mikebevz/xsd2php/LegkoXML.php';
require_once 'com/mikebevz/xsd2php/LegkoXML.php';
require_once 'Zend/Console/Getopt.php';
//require_once '../../lib/ZF/1.10.7/Zend/Exception.php';
//require_once '../../lib/ZF/1.10.7/Zend/Console/Getopt/Exception.php';
Expand Down Expand Up @@ -115,4 +120,4 @@ private function println($msg = "") {
default:
echo "Help";
break;
}
}

0 comments on commit 33c5466

Please sign in to comment.