flush.php 644 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/php
  2. <?php
  3. chdir(dirname(__FILE__));
  4. require_once 'common.php';
  5. assertCli();
  6. /**
  7. * @file
  8. * Runs all generation/flush cache scripts to ensure that somewhat volatile
  9. * generated files are up-to-date.
  10. */
  11. function e($cmd) {
  12. echo "\$ $cmd\n";
  13. passthru($cmd, $status);
  14. echo "\n";
  15. if ($status) exit($status);
  16. }
  17. $php = empty($_SERVER['argv'][1]) ? 'php' : $_SERVER['argv'][1];
  18. e($php . ' generate-includes.php');
  19. e($php . ' generate-schema-cache.php');
  20. e($php . ' flush-definition-cache.php');
  21. e($php . ' generate-standalone.php');
  22. e($php . ' config-scanner.php');
  23. // vim: et sw=4 sts=4