Newer
Older
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
diff -urp openresty-1.9.15.1/bundle/resty-cli-0.12/bin/resty openresty-1.9.15.1-patched/bundle/resty-cli-0.12/bin/resty
--- openresty-1.9.15.1/bundle/resty-cli-0.12/bin/resty 2016-06-03 17:50:22.000000000 -0700
+++ openresty-1.9.15.1-patched/bundle/resty-cli-0.12/bin/resty 2016-07-12 12:50:45.436818037 -0700
@@ -65,9 +65,9 @@ if (!$nginx_path) {
$ext = '';
}
}
- $nginx_path = File::Spec->catfile($FindBin::Bin, "..", "nginx", "sbin", "nginx$ext");
+ $nginx_path = File::Spec->catfile($FindBin::RealBin, "..", "nginx", "sbin", "nginx$ext");
if (!-f $nginx_path) {
- $nginx_path = File::Spec->catfile($FindBin::Bin, "nginx$ext");
+ $nginx_path = File::Spec->catfile($FindBin::RealBin, "nginx$ext");
if (!-f $nginx_path) {
$nginx_path = "nginx"; # find in PATH
}
diff -urp openresty-1.9.15.1/bundle/resty-cli-0.12/bin/restydoc openresty-1.9.15.1-patched/bundle/resty-cli-0.12/bin/restydoc
--- openresty-1.9.15.1/bundle/resty-cli-0.12/bin/restydoc 2016-06-03 17:50:22.000000000 -0700
+++ openresty-1.9.15.1-patched/bundle/resty-cli-0.12/bin/restydoc 2016-07-12 12:51:04.161322019 -0700
@@ -43,10 +43,10 @@ if (!defined $pager) {
}
}
-my $index_file = "$FindBin::Bin/../resty.index";
+my $index_file = "$FindBin::RealBin/../resty.index";
{
if (!-f $index_file) {
- my $f = "$FindBin::Bin/resty.index";
+ my $f = "$FindBin::RealBin/resty.index";
if (-f $f) {
$index_file = $f;
}
@@ -179,7 +179,7 @@ if (!@dists) {
die "ERROR: $index_file is empty.\n";
}
-my $poddir = "$FindBin::Bin/../pod";
+my $poddir = "$FindBin::RealBin/../pod";
if ($section_pat) {
$section_pat = lc $section_pat;
diff -urp openresty-1.9.15.1/bundle/resty-cli-0.12/bin/restydoc-index openresty-1.9.15.1-patched/bundle/resty-cli-0.12/bin/restydoc-index
--- openresty-1.9.15.1/bundle/resty-cli-0.12/bin/restydoc-index 2016-06-03 17:50:22.000000000 -0700
+++ openresty-1.9.15.1-patched/bundle/resty-cli-0.12/bin/restydoc-index 2016-07-12 12:51:13.478124001 -0700
@@ -17,7 +17,7 @@ GetOptions(
) or die "Usage: $0 [--outdir DIR] DIR\n";
if (!defined $outdir) {
- $outdir = "$FindBin::Bin/..";
+ $outdir = "$FindBin::RealBin/..";
} else {
$outdir = File::Spec->rel2abs($outdir);
@@ -135,7 +135,7 @@ sub wanted {
#warn $name;
#warn "wanted: $File::Find::dir $File::Find::name $_\n";
$podfile = "$poddir/$name.pod";
- shell("$FindBin::Bin/md2pod.pl -o $podfile $mdfile");
+ shell("$FindBin::RealBin/md2pod.pl -o $podfile $mdfile");
}
my $dist_module = process_pod($podfile, $name);
--- openresty-1.9.15.1-patched/bundle/resty-cli-0.12/bin/restydoc 2016-07-12 12:51:04.161322019 -0700
+++ openresty-1.9.15.1-patched2/bundle/resty-cli-0.12/bin/restydoc 2016-07-13 16:29:31.227640004 -0700
@@ -517,7 +517,8 @@ sub process_section_hit {
}
my $groff_cmd = get_groff_cmd();
- exec("pod2man -u -c '$full_dist_name' "
+ my $pod2man_cmd = get_pod2man_cmd();
+ exec("$pod2man_cmd -c '$full_dist_name' "
. " -r -s 7 -n '$module_name' "
. "$tmpfile | $groff_cmd | $pager");
}
@@ -550,7 +551,8 @@ sub process_module_hit {
}
my $groff_cmd = get_groff_cmd();
- exec("pod2man -u -c '$full_dist_name' "
+ my $pod2man_cmd = get_pod2man_cmd();
+ exec("$pod2man_cmd -c '$full_dist_name' "
. "-r -s 7 -n '$name' "
. "$podfile | $groff_cmd | $pager");
}
@@ -563,6 +565,14 @@ sub get_groff_cmd {
return "groff -Tascii -mandoc -Wbreak";
}
+sub get_pod2man_cmd {
+ my $help = `pod2man --help`;
+ if ($help =~ /^ \s+ -u \b/xm) {
+ return "pod2man -u";
+ }
+ return "pod2man";
+}
+
sub shell {
my $cmd = shift;