PageRenderTime 52ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/common/libraries/plugin/htmlpurifier/maintenance/flush.php

https://bitbucket.org/chamilo/chamilo-dev/
PHP | 31 lines | 18 code | 6 blank | 7 comment | 1 complexity | cc5f8bd00c214f23a143962735d5a268 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, LGPL-2.1, LGPL-3.0, GPL-3.0, MIT
  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. {
  13. echo "\$ $cmd\n";
  14. passthru($cmd, $status);
  15. echo "\n";
  16. if ($status)
  17. exit($status);
  18. }
  19. $php = empty($_SERVER['argv'][1]) ? 'php' : $_SERVER['argv'][1];
  20. e($php . ' generate-includes.php');
  21. e($php . ' generate-schema-cache.php');
  22. e($php . ' flush-definition-cache.php');
  23. e($php . ' generate-standalone.php');
  24. e($php . ' config-scanner.php');
  25. // vim: et sw=4 sts=4