2025-04-03 20:01:27 +00:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
require_once __DIR__ . '/../misuzu.php';
|
|
|
|
|
2025-04-03 20:09:18 +00:00
|
|
|
if(empty($msz->tplCtx->cachePath))
|
2025-04-03 20:01:27 +00:00
|
|
|
die(sprintf('No cache path is specified.%s', PHP_EOL));
|
2025-04-03 20:09:18 +00:00
|
|
|
if(!is_dir($msz->tplCtx->cachePath))
|
2025-04-03 20:01:27 +00:00
|
|
|
die(sprintf('Cache directory does not exist.%s', PHP_EOL));
|
2025-04-03 20:09:18 +00:00
|
|
|
if(fileowner($msz->tplCtx->cachePath) !== posix_getuid())
|
2025-04-03 20:01:27 +00:00
|
|
|
die(sprintf('Script must be run as the owner of the cache directory.%s', PHP_EOL));
|
|
|
|
|
2025-04-03 20:09:18 +00:00
|
|
|
echo `rm -rv {$msz->tplCtx->cachePath}`;
|