Rev 686 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 686 | Rev 716 | ||
---|---|---|---|
Line 296... | Line 296... | ||
296 | $ec = -1; |
296 | $ec = -1; |
297 | exec('svn info https://svn.viathinksoft.com/svn/oidplus/trunk/ | grep "Revision:" | cut -d " " -f 2', $out, $ec); |
297 | exec('svn info https://svn.viathinksoft.com/svn/oidplus/trunk/ | grep "Revision:" | cut -d " " -f 2', $out, $ec); |
298 | if ($ec != 0) die("SVN Info failed!!!\n"); |
298 | if ($ec != 0) die("SVN Info failed!!!\n"); |
299 | $max_svn = implode("", $out); |
299 | $max_svn = implode("", $out); |
300 | 300 | ||
- | 301 | function fix_rev699_bug($dir) { |
|
- | 302 | // Fix syntax error that lead to a stalled update! |
|
- | 303 | $file = $dir.'/plugins/viathinksoft/adminPages/900_software_update/OIDplusPageAdminSoftwareUpdate.class.php'; |
|
- | 304 | $cont = file_get_contents($file); |
|
- | 305 | $cont = str_replace("urlencode('oidplus:system_file_check',OIDplus::getEditionInfo()['downloadpage']))", "urlencode('oidplus:system_file_check'),OIDplus::getEditionInfo()['downloadpage'])", $cont); |
|
- | 306 | file_put_contents($file, $cont); |
|
- | 307 | ||
- | 308 | // Fix syntax error that lead to a stalled update! |
|
- | 309 | $file = $dir.'/plugins/viathinksoft/adminPages/901_vnag_version_check/vnag.php'; |
|
- | 310 | $cont = file_get_contents($file); |
|
- | 311 | $cont = str_replace("\t\tOIDplus::getEditionInfo()", "", $cont); |
|
- | 312 | file_put_contents($file, $cont); |
|
- | 313 | } |
|
- | 314 | ||
301 | for ($i=2; $i<=$max_svn; $i++) { |
315 | for ($i=2; $i<=$max_svn; $i++) { |
302 | echo "SVN revision $i / $max_svn\r"; |
316 | echo "SVN revision $i / $max_svn\r"; |
303 | 317 | ||
304 | $outfile = $output_dir."/update_".($i-1)."_to_$i.txt"; |
318 | $outfile = $output_dir."/update_".($i-1)."_to_$i.txt"; |
305 | if (!$force && file_exists($outfile)) continue; |
319 | if (!$force && file_exists($outfile)) continue; |
306 | 320 | ||
307 | $outdir_old = "/tmp/oidplus_svntmp2_".($i-1)."/"; |
321 | $outdir_old = "/tmp/oidplus_svntmp2_".($i-1)."/"; |
308 | if ($outdir_old && is_dir($outdir_old)) exec("rm -rf $outdir_old", $out, $ec); |
322 | if ($outdir_old && is_dir($outdir_old)) exec("rm -rf $outdir_old", $out, $ec); |
309 | exec("svn co https://svn.viathinksoft.com/svn/oidplus/trunk/@".($i-1)." $outdir_old", $out, $ec); |
323 | exec("svn co https://svn.viathinksoft.com/svn/oidplus/trunk/@".($i-1)." $outdir_old", $out, $ec); |
310 | if ($ec != 0) die("Checkout of SVN Rev ".($i-1)." failed!!!\n"); |
324 | if ($ec != 0) die("Checkout of SVN Rev ".($i-1)." failed!!!\n"); |
- | 325 | if ($i-1 == 699) fix_rev699_bug($outdir_old); |
|
311 | 326 | ||
312 | $outdir_new = "/tmp/oidplus_svntmp2_$i/"; |
327 | $outdir_new = "/tmp/oidplus_svntmp2_$i/"; |
313 | if ($outdir_new && is_dir($outdir_new)) exec("rm -rf $outdir_new", $out, $ec); |
328 | if ($outdir_new && is_dir($outdir_new)) exec("rm -rf $outdir_new", $out, $ec); |
314 | exec("svn co https://svn.viathinksoft.com/svn/oidplus/trunk/@$i $outdir_new", $out, $ec); |
329 | exec("svn co https://svn.viathinksoft.com/svn/oidplus/trunk/@$i $outdir_new", $out, $ec); |
315 | if ($ec != 0) die("Checkout of SVN Rev ".($i)." failed!!!\n"); |
330 | if ($ec != 0) die("Checkout of SVN Rev ".($i)." failed!!!\n"); |
- | 331 | if ($i == 699) fix_rev699_bug($outdir_new); |
|
316 | 332 | ||
317 | $outscript = "<?php\n"; |
333 | $outscript = "<?php\n"; |
318 | $outscript .= "\n"; |
334 | $outscript .= "\n"; |
319 | $outscript .= "/*\n"; |
335 | $outscript .= "/*\n"; |
320 | $outscript .= " * OIDplus 2.0\n"; |
336 | $outscript .= " * OIDplus 2.0\n"; |
Line 472... | Line 488... | ||
472 | } |
488 | } |
473 | 489 | ||
474 | ksort($out); |
490 | ksort($out); |
475 | 491 | ||
476 | file_put_contents($output_dir.'/releases.ser', serialize($out)); |
492 | file_put_contents($output_dir.'/releases.ser', serialize($out)); |
- | 493 | file_put_contents($output_dir.'/releases.ser.gz', gzencode(serialize($out))); |
|
477 | } |
494 | } |
478 | 495 | ||
479 | # --- |
496 | # --- |
480 | 497 | ||
481 | function split_equal_length($data, $width=65) { |
498 | function split_equal_length($data, $width=65) { |