aboutsummaryrefslogtreecommitdiff
path: root/mod/less/vendors/lessphp/lessify
blob: 416f0ca4c552613725279b7d4cf2e049333d7e25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/php -q
<?php

if (php_sapi_name() != "cli") { 
	err($fa.$argv[0]." must be run in the command line.");
	exit(1);
}
$exe = array_shift($argv); // remove filename

if (!$fname = array_shift($argv)) {
	exit("Usage: ".$exe." input-file\n");
}

require "lessify.inc.php";

try  {
	$parser = new lessify($fname);
	echo $parser->parse();
} catch (exception $e) {
	exit("Fatal error: ".$e->getMessage()."\n");
}