summaryrefslogtreecommitdiffstats
path: root/web/attachments/146541-perl-path.patch
blob: 35e1718bcf31c4ad810c4782173f257199b1ea34 (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
37
38
39
40
41
42
43
--- plugins-scripts/subst.in.orig	2005-08-12 15:53:26.000000000 -0700
+++ plugins-scripts/subst.in	2005-08-12 15:53:51.000000000 -0700
@@ -1,24 +1,5 @@
 #!/usr/bin/awk
 
-function which(c,path) {
-	cmd = "test -x " c;
-
-	if (system(cmd)==0) {
-		return c;
-	} 
-
-	sub(/\/.*\//,"",c);
-  for (dir in path) {
-			cmd = "test -x " path[dir] "/" c;
-			if (system(cmd)==0) {
-					return path[dir] "/" c;
-			} 
-	}
-
-
-	return c;
-}
-
 # used to replace "use lib utils.pm" with "use lib @libexecdir"
 #
 function led() {
@@ -58,15 +39,6 @@
 	sub(/\=.*$/,"='@trusted_path@' # autoconf-derived");
 }
 
-# Specific programs
-
-#
-/^[^#]/ && /(\/.*)?\/(bin|sbin|lib|libexec)\// {
-	match($0,/(\/.*)?\/(bin|sbin|lib|libexec)\/[-_a-zA-Z0-9]+/);
-	start=RSTART+RLENGTH;
-	c=substr($0,RSTART,RLENGTH);
-	sub(c,which(c,path));
-}
 
 {
 	print;