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/validation.cli.php

    r468 r533  
    55 * For details visit the project site: <http://trac.strangecode.com/codebase/>
    66 * Copyright 2001-2012 Strangecode, LLC
    7  * 
     7 *
    88 * This file is part of The Strangecode Codebase.
    99 *
     
    1212 * Free Software Foundation, either version 3 of the License, or (at your option)
    1313 * any later version.
    14  * 
     14 *
    1515 * The Strangecode Codebase is distributed in the hope that it will be useful, but
    1616 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1717 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    1818 * details.
    19  * 
     19 *
    2020 * You should have received a copy of the GNU General Public License along with
    2121 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
     
    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.