Changeset 192 for trunk/trax/trax.php

Show
Ignore:
Timestamp:
03/27/06 15:02:53 (6 years ago)
Author:
haas
Message:

working Pear install w/ tests

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/trax.php

    r191 r192  
    3434 */ 
    3535$search = array( 
    36                 '@TRAX-CONFIG@' // symbol for the full filesystem path 
     36                '/@TRAX-CONFIG@/' // symbol for the full filesystem path 
    3737                                // to the Trax config/ directory in 
    3838                                // the user's work area 
     
    4848function trax() { 
    4949 
     50    global $search, $replace; 
     51 
    5052    //  Get command line argument, if any 
    5153    if (!array_key_exists('argc',$GLOBALS) 
     
    7274 
    7375    //  Assign real values for symbol substitution 
    74     $replace[0] = $dstdir.'config'; // actual value of the full 
    75                                     // filesystem path to the Trax 
    76                                     // config/ directory in the user's 
    77                                     // work area  
     76    $replace[0] = realpath('./'.$dstdir.'config'); // actual value of 
     77                                // the full filesystem path to the 
     78                                // Trax config/ directory in the 
     79                                // user's work area 
    7880 
    7981    $srcdir = SOURCE_DIR; 
     
    227229function copy_file($src_path, $dst_path) { 
    228230 
     231    global $search, $replace; 
     232 
    229233    //  Read source file into a string 
    230234    if (!$file = file_get_contents($src_path)) { 
     
    233237 
    234238    //  Substitute @TRAX-...@ symbols for appropriate values 
     239    $file = preg_replace($search, $replace, $file); 
    235240 
    236241    //  Write out file contents