Changeset 4309
- Timestamp:
- 07/06/07 01:52:05 (6 years ago)
- Files:
-
- freepbx/branches/2.3/install_amp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.3/install_amp
r4272 r4309 110 110 out(" --install-moh Install default music-on-hold files (normally doesn't, unless "); 111 111 out(" it's a new installation)"); 112 //out(" --make-links-devel Make links to files in the source directory instead of copying"); 113 //out(" (intended for developers only)"); 112 114 out(" --my-svn-is-correct Ignore Asterisk version, assume it is correct"); 113 115 out(" --engine <name> Use the specified PBX Engine ('asterisk', 'asterisk14' or 'openpbx')"); … … 292 294 global $asterisk_conf; 293 295 global $install_moh; 296 global $make_links; 294 297 295 298 // total # files, # actually copied … … 366 369 $num_files++; 367 370 if ($overwrite) { 368 debug( "copy".$source." -> ".$destination);371 debug(($make_links ? "link" : "copy")." ".$source." -> ".$destination); 369 372 if (!$dryrun) { 370 copy($source, $destination); 373 if ($make_links) { 374 // symlink, unlike copy, doesn't overwrite - have to delete first 375 if (is_link($destination) || file_exists($destination)) { 376 unlink($destination); 377 } 378 symlink($_ENV["PWD"]."/".$source, $destination); 379 } else { 380 copy($source, $destination); 381 } 371 382 $num_copied++; 372 383 } … … 758 769 // **** Parse out command-line options 759 770 $shortopts = "h?u:p:"; 760 $longopts = array("help","debug","dry-run","username=","password=","force-version=","dbhost=","no-files","dbname=","my-svn-is-correct","engine=","install-moh" );771 $longopts = array("help","debug","dry-run","username=","password=","force-version=","dbhost=","no-files","dbname=","my-svn-is-correct","engine=","install-moh","make-links-devel"); 761 772 762 773 $args = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), $shortopts, $longopts); … … 773 784 774 785 $install_moh = false; 786 $make_links = false; 775 787 776 788 //initialize variables to avoid php notices … … 829 841 case "--install-moh": 830 842 $install_moh = true; 843 break; 844 case "--make-links-devel": 845 $make_links = true; 831 846 break; 832 847 case "--fopwebroot":
