summaryrefslogtreecommitdiffstats
path: root/php-jakubledl-dissect-bin.patch
blob: ed2d9dc2e86e98140e02f36391afe52bb91538cc (plain)
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
diff --git a/bin/dissect.php b/bin/dissect.php
index db6b1c4..830021f 100644
--- a/bin/dissect.php
+++ b/bin/dissect.php
@@ -1,27 +1,13 @@
+#!/usr/bin/env php
 <?php
 
-define('DISSECT_VERSION', 'DEV');
+define('DISSECT_VERSION', '__VERSION__');
 
-if (is_dir($vendor = getcwd() . '/vendor')) {
-    require $vendor . '/autoload.php';
-}
-
-if (is_dir($vendor = __DIR__ . '/../vendor')) {
-    require $vendor . '/autoload.php';
-} elseif (is_dir($vendor = __DIR__ . '/../../../../vendor')) {
-    require $vendor . '/autoload.php';
-} else {
-    die(
-        'You must set up the project dependencies.' . PHP_EOL .
-        'To do that, run the following commands:' . PHP_EOL . PHP_EOL .
-        '$ curl -s http://getcomposer.org/installer | php' . PHP_EOL .
-        '$ php composer.phar install' . PHP_EOL
-    );
-}
+require_once '__PHPDIR__/Dissect/autoload.php';
 
 if (!class_exists('Symfony\Component\Console\Application')) {
     die(
-        'You must install the symfony/console package in order ' .
+        'You must install the php-symfony-console package in order ' .
         'to use the command-line tool.' . PHP_EOL
     );
 }