File: 0004-Fix-code-loading-in-minifycss-and-minifyjs.patch

package info (click to toggle)
matthiasmullie-minify 1.3.73-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,140 kB
  • sloc: php: 3,198; javascript: 2,083; makefile: 38; xml: 27; sh: 6
file content (53 lines) | stat: -rw-r--r-- 1,637 bytes parent folder | download
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From: Robin Gustafsson <robin@rgson.se>
Date: Sat, 13 Apr 2024 16:05:06 +0200
Subject: Fix code loading in minifycss and minifyjs

Use the package's autoload.php to include the installed library's code
in the minifycss and minifyjs programs.

Forwarded: not-needed
---
 bin/minifycss | 9 +--------
 bin/minifyjs  | 9 +--------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/bin/minifycss b/bin/minifycss
index 6a681a8..1a8b2f6 100755
--- a/bin/minifycss
+++ b/bin/minifycss
@@ -3,14 +3,7 @@
 use MatthiasMullie\Minify;
 
 // command line utility to minify CSS
-if (file_exists(__DIR__ . '/../../../autoload.php')) {
-    // if composer install
-    require_once __DIR__ . '/../../../autoload.php';
-} else {
-    require_once __DIR__ . '/../src/Minify.php';
-    require_once __DIR__ . '/../src/CSS.php';
-    require_once __DIR__ . '/../src/Exception.php';
-}
+require_once '/usr/share/php/MatthiasMullie/Minify/autoload.php';
 
 error_reporting(E_ALL);
 // check PHP setup for cli arguments
diff --git a/bin/minifyjs b/bin/minifyjs
index 4cbe63f..90981be 100755
--- a/bin/minifyjs
+++ b/bin/minifyjs
@@ -3,14 +3,7 @@
 use MatthiasMullie\Minify;
 
 // command line utility to minify JS
-if (file_exists(__DIR__ . '/../../../autoload.php')) {
-    // if composer install
-    require_once __DIR__ . '/../../../autoload.php';
-} else {
-    require_once __DIR__ . '/../src/Minify.php';
-    require_once __DIR__ . '/../src/JS.php';
-    require_once __DIR__ . '/../src/Exception.php';
-}
+require_once '/usr/share/php/MatthiasMullie/Minify/autoload.php';
 
 error_reporting(E_ALL);
 // check PHP setup for cli arguments