forked from resiprocate/resiprocate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buginfo.pl
executable file
·68 lines (55 loc) · 980 Bytes
/
buginfo.pl
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
#!/usr/bin/perl
$uname = `uname -a`;
§ion ("uname -a");
print "$uname \n";
$cc = `make show.CC`;
chop $cc;
$cc =~ s/.*=//g;
&exec("$cc --version");
$conf = `grep := build/Makefile.conf`;
§ion("Makefile.conf");
print $conf."\n";
while ($conf =~ /([^ ]*) *:= *(.*)/g)
{
$name = $1;
$val = $2;
$name =~ s/[\r\n]//g;
$val =~ s/[\r\n]//g;
$conf{$name} = $val;
}
if ($conf{'USE_SSL'} eq 'yes')
{
if (length ($conf{SSL_LOCATION}))
{
&exec("${SSL_LOCATION}/apps/openssl version");
}
else
{
&exec("openssl version");
}
}
&exec ("svnversion");
if (-e 'ReleaseNotes.txt')
{
&exec ("head ReleaseNotes.txt");
}
if ($uname =~ /Darwin/i)
{
&exec ("sysctl -a hw");
}
elsif ($uname =~ /Linux/i)
{
&exec ("cat /proc/cpuinfo");
}
sub exec
{
my ($cmd) = shift;
§ion($cmd);
print `$cmd`."\n";
}
sub section
{
my ($title) = shift;
my ($center) = int(36 - length($title)/2);
print (('='x$center)." $title ".('='x$center)."\n");
}