Blame php-udan11-sql-parser-autoload.patch

a58b248
diff -up bin/highlight-query.rpm bin/highlight-query
df1ddf8
--- bin/highlight-query.rpm	2016-09-13 13:04:29.517214693 +0200
df1ddf8
+++ bin/highlight-query	2016-09-13 13:05:35.400519256 +0200
a58b248
@@ -1,29 +1,7 @@
a58b248
 #!/usr/bin/env php
a58b248
 
a58b248
 
a58b248
-$files = array(
a58b248
-    __DIR__ . "/../vendor/autoload.php",
a58b248
-    __DIR__ . "/../../vendor/autoload.php",
a58b248
-    __DIR__ . "/../../../autoload.php",
a58b248
-    "vendor/autoload.php"
a58b248
-);
a58b248
-
a58b248
-$found = false;
a58b248
-foreach ($files as $file) {
a58b248
-    if (file_exists($file)) {
a58b248
-        require_once $file;
a58b248
-        $found = true;
a58b248
-        break;
a58b248
-    }
a58b248
-}
a58b248
-
a58b248
-if (!$found) {
a58b248
-    die(
a58b248
-        "You need to set up the project dependencies using the following commands:" . PHP_EOL .
df1ddf8
-        "curl -sS https://getcomposer.org/installer | php" . PHP_EOL .
a58b248
-        "php composer.phar install" . PHP_EOL
a58b248
-    );
a58b248
-}
a58b248
+require '/usr/share/php/SqlParser/autoload.php';
a58b248
 
a58b248
 $cli = new SqlParser\Utils\CLI();
a58b248
 exit($cli->runHighlight());
a58b248
diff -up bin/lint-query.rpm bin/lint-query
df1ddf8
--- bin/lint-query.rpm	2016-09-13 13:04:29.517214693 +0200
df1ddf8
+++ bin/lint-query	2016-09-13 13:05:58.585626435 +0200
a58b248
@@ -1,29 +1,7 @@
a58b248
 #!/usr/bin/env php
a58b248
 
a58b248
 
a58b248
-$files = array(
a58b248
-    __DIR__ . "/../vendor/autoload.php",
a58b248
-    __DIR__ . "/../../vendor/autoload.php",
a58b248
-    __DIR__ . "/../../../autoload.php",
a58b248
-    "vendor/autoload.php"
a58b248
-);
a58b248
-
a58b248
-$found = false;
a58b248
-foreach ($files as $file) {
a58b248
-    if (file_exists($file)) {
a58b248
-        require_once $file;
a58b248
-        $found = true;
a58b248
-        break;
a58b248
-    }
a58b248
-}
a58b248
-
a58b248
-if (!$found) {
a58b248
-    die(
a58b248
-        "You need to set up the project dependencies using the following commands:" . PHP_EOL .
df1ddf8
-        "curl -sS https://getcomposer.org/installer | php" . PHP_EOL .
a58b248
-        "php composer.phar install" . PHP_EOL
a58b248
-    );
a58b248
-}
a58b248
+require '/usr/share/php/SqlParser/autoload.php';
a58b248
 
a58b248
 $cli = new SqlParser\Utils\CLI();
a58b248
 exit($cli->runLint());