summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/highlight-query29
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/highlight-query b/bin/highlight-query
new file mode 100755
index 0000000..fe916d9
--- /dev/null
+++ b/bin/highlight-query
@@ -0,0 +1,29 @@
+#!/usr/bin/env php
+<?php
+
+$files = array(
+ __DIR__ . "/../vendor/autoload.php",
+ __DIR__ . "/../../vendor/autoload.php",
+ __DIR__ . "/../../../autoload.php",
+ "vendor/autoload.php"
+);
+
+$found = false;
+foreach ($files as $file) {
+ if (file_exists($file)) {
+ require_once $file;
+ $found = true;
+ break;
+ }
+}
+
+if (!$found) {
+ die(
+ "You need to set up the project dependencies using the following commands:" . PHP_EOL .
+ "curl -s http://getcomposer.org/installer | php" . PHP_EOL .
+ "php composer.phar install" . PHP_EOL
+ );
+}
+
+$cli = new SqlParser\Utils\CLI();
+exit($cli->run());