Ignore:
Timestamp:
Jul 13, 2015 8:48:29 PM (9 years ago)
Author:
anonymous
Message:

Adapted module maker scripts to use the new cli config file. Updated config to load codebase classes from its own codebase dir.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/form_template.cli.php

    r523 r533  
    2626 */
    2727
    28 include_once dirname(__FILE__) . '/_config.inc.php';
     28if ($_SERVER['argc'] > 1 && isset($_SERVER['argv'][1]) && '' != $_SERVER['argv'][1] && is_dir($_SERVER['argv'][1])) {
     29    // First arg is path to current site. Realpath removes trailing /s
     30    define('COMMON_BASE', realpath($_SERVER['argv'][1]));
     31} else {
     32    die("Error: First argument must be the directory path to an existing site (ex: /home/sc/www.strangecode.com).\n");
     33}
     34
     35include_once dirname(__FILE__) . '/../_config.inc.php';
    2936
    3037// Test arguments.
Note: See TracChangeset for help on using the changeset viewer.