summaryrefslogtreecommitdiffstats
path: root/php-bartlett-umlwriter-rpm.patch
blob: e3bac8e9b49cfe31293a915e67f6ebc2fc720310 (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
diff -up ./bin/umlwriter.rpm ./bin/umlwriter
--- ./bin/umlwriter.rpm	2015-04-02 13:07:20.000000000 +0200
+++ ./bin/umlwriter	2015-06-26 10:34:32.782633902 +0200
@@ -2,23 +2,14 @@
 <?php
 $appName = 'umlWriter';
 
-if (\Phar::running()) {
-    $vendorDir = 'phar://' . strtolower($appName) . '.phar/vendor';
-} else {
-    $baseDir   = dirname(__DIR__);
-    $vendorDir = $baseDir . '/vendor';
-
-    if (!file_exists($vendorDir . '/autoload.php')) {
-        $vendorDir = dirname(dirname($baseDir));
-    }
-}
-require_once $vendorDir . '/autoload.php';
-
 if (PHP_SAPI !== 'cli') {
     return;
 }
 
+$vendorDir = '/usr/share/php';
+require_once $vendorDir . '/Bartlett/UmlWriter/autoload.php';
+
 use Bartlett\UmlWriter\Console\Application;
 
-$application = new Application($appName, '1.2');
+$application = new Application($appName, '@package_version@');
 $application->run();