Check if compile.php target directories exist, exit if not
If it's not run from the correct directory, a spew of warnings appear Add done message and also one if not running on the CLI Change-Id: Iec508acf4216aba7d084bb57156b87bfb117ff4a
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<?php
|
||||
|
||||
if ( isset( $_SERVER['REQUEST_METHOD'] ) ) {
|
||||
exit();
|
||||
exit( "compile.php should be run from the command line\n" );
|
||||
}
|
||||
|
||||
if ( !is_dir( '../fonts/' ) ) {
|
||||
exit( "compile.php should be run from the data/fontrepo/scripts directory\n" );
|
||||
}
|
||||
|
||||
$list = array();
|
||||
@@ -97,3 +101,5 @@ $js = <<<JAVASCRIPT
|
||||
|
||||
JAVASCRIPT;
|
||||
file_put_contents( '../../../resources/js/ext.uls.webfonts.repository.js', $js );
|
||||
|
||||
echo "Done.\n";
|
||||
|
||||
Reference in New Issue
Block a user