1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Fri, 13 Feb 2015 13:08:11 -0400
Subject: Use homemade autoload
Work around the lack of proper Composer support.
Forwarded: not-needed
---
bin/jsonlint | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/bin/jsonlint b/bin/jsonlint
index 202c9ee..8bce59b 100755
--- a/bin/jsonlint
+++ b/bin/jsonlint
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
/*
@@ -17,13 +17,7 @@ function includeIfExists($file)
}
}
-if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
- $msg = 'You must set up the project dependencies, run the following commands:'.PHP_EOL.
- 'curl -sS https://getcomposer.org/installer | php'.PHP_EOL.
- 'php composer.phar install'.PHP_EOL;
- fwrite(STDERR, $msg);
- exit(1);
-}
+includeIfExists('/usr/share/php/Seld/JsonLint/autoload.php');
use Seld\JsonLint\JsonParser;
|