lbry.com/update.php
Alex Grintsvayg 764ec67919 gzip assets
2016-09-02 10:22:30 -04:00

25 lines
468 B
PHP
Executable file

#!/usr/bin/php
<?php
include __DIR__.'/bootstrap.php';
View::gzipAssets();
die;
$options = getopt('f');
$force = isset($options['f']); // update even if no NEEDS_UPDATE file exists
$needsUpdateFile = ROOT_DIR . '/data/writeable/NEEDS_UPDATE';
if (!$force && !file_exists($needsUpdateFile))
{
echo "No update necessary\n";
return;
}
@unlink($needsUpdateFile);
chdir(ROOT_DIR);
Shell::exec('git fetch && git reset --hard origin/master');
View::compileCss();