Rev 1426 | Rev 1428 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1426 | Rev 1427 | ||
---|---|---|---|
Line 522... | Line 522... | ||
522 | $outscript .= "if (trim(@file_get_contents('oidplus_version.txt')) !== 'Revision $rev') err('Could not write to oidplus_version.txt!');\n"; |
522 | $outscript .= "if (trim(@file_get_contents('oidplus_version.txt')) !== 'Revision $rev') err('Could not write to oidplus_version.txt!');\n"; |
523 | } |
523 | } |
524 | $outscript .= "\n"; |
524 | $outscript .= "\n"; |
525 | $outscript .= "\n"; |
525 | $outscript .= "\n"; |
526 | //$outscript .= "info('Update to OIDplus version $version done!');\n"; |
526 | //$outscript .= "info('Update to OIDplus version $version done!');\n"; |
527 | $outscript .= "echo 'DONE'; // This exact string will be compared in Update v\n"; |
527 | $outscript .= "echo 'DONE'; // This exact string will be compared in Update v3\n"; |
528 | $outscript .= "\n"; |
528 | $outscript .= "\n"; |
529 | $outscript .= "unlink(__FILE__);\n"; |
529 | $outscript .= "unlink(__FILE__);\n"; |
530 | $outscript .= "\n"; |
530 | $outscript .= "\n"; |
531 | 531 | ||
532 | // Now add digital signature |
532 | // Now add digital signature |
Line 569... | Line 569... | ||
569 | $ec = -1; |
569 | $ec = -1; |
570 | $out = array(); |
570 | $out = array(); |
571 | exec('php -l '.escapeshellarg($outfile), $out, $ec); |
571 | exec('php -l '.escapeshellarg($outfile), $out, $ec); |
572 | if ($ec != 0) { |
572 | if ($ec != 0) { |
573 | fwrite(STDERR, "STOP! $outfile PHP syntax error!\n"); |
573 | fwrite(STDERR, "STOP! $outfile PHP syntax error!\n"); |
574 | unlink($outfile); |
574 | @unlink($outfile); |
575 | return; |
575 | return; |
576 | } |
576 | } |
577 | file_put_contents($outfile.'.gz', gzencode($outscript)); |
577 | file_put_contents($outfile.'.gz', gzencode($outscript)); |
578 | } |
578 | } |