12 lines
451 B
PHP
Executable file
12 lines
451 B
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
require_once __DIR__ . '/../misuzu.php';
|
|
|
|
if(empty($msz->tplCtx->cachePath))
|
|
die(sprintf('No cache path is specified.%s', PHP_EOL));
|
|
if(!is_dir($msz->tplCtx->cachePath))
|
|
die(sprintf('Cache directory does not exist.%s', PHP_EOL));
|
|
if(fileowner($msz->tplCtx->cachePath) !== posix_getuid())
|
|
die(sprintf('Script must be run as the owner of the cache directory.%s', PHP_EOL));
|
|
|
|
echo `rm -rv {$msz->tplCtx->cachePath}`;
|