Bez popisu

business.php 890B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <html>
  2. <body>
  3. <?php
  4. $location = $_GET['location'];
  5. $tagName = $_GET['tag_name'];
  6. $mode = $_GET['mode'];
  7. $version = $_GET['version'];
  8. //echo "$location, $tagName, $mode, $version";
  9. $SVN_LOCATION = "svn://firstlinkapp.com/repository/source/ios/";
  10. $WHOLE_TRUNK_PATH = $SVN_LOCATION . "trunk/FirstLink";
  11. $PREFIX_TAG_PATH = $SVN_LOCATION . "tags/";
  12. $path;
  13. if ($location == "trunk") {
  14. $path = $WHOLE_TRUNK_PATH;
  15. } else {
  16. $path = $PREFIX_TAG_PATH . $tagName . "/FirstLink";
  17. }
  18. $cmd = 'python build.py -p ' . $path . " -m " . $mode . " -v " . $version;
  19. //echo($cmd);
  20. //$output = shell_exec($cmd);
  21. //echo "<pre>$output</pre>";
  22. if( ($fp = popen($cmd, "r")) ) {
  23. while(!feof($fp) ){
  24. echo fread($fp, 512);
  25. flush();
  26. echo "<script> window.scrollTo(0,document.body.scrollHeight) </script>";
  27. }
  28. fclose($fp);
  29. }
  30. ?>
  31. </body>
  32. </html>