forked from veripool/verilog-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_log.pl
executable file
·82 lines (74 loc) · 1.69 KB
/
make_log.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/perl
unlink("log");
$attach_name = "verilog-mode.el.gz";
$encoded_data = `gzip -c9 verilog-mode.el | mmencode `;
if ( -d ".svn") {
system("svn log verilog-mode.el > log");
open(LOG,"<log");
while(<LOG>) {
if (/^r([\d\.]+)/) {
$rev = $1;
last;
}
}
} else {
system("cvs log verilog-mode.el > log");
open(LOG,"<log");
while(<LOG>) {
if (/^head: ([\d\.]+)$/) {
$rev = $1;
}
last if (/^description:$/);
}
}
open(O,">emacs-version.h");
open(C,">ChangeLog.txt");
$release_date = `date +"%D"`;
print O <<"X";
<define-tag emacs-vid>
$rev
</define-tag>
<define-tag emacs-release-date>
$release_date
</define-tag>
X
close(O);
open(O,">mmencoded_verilog-mode");
print O <<"XX";
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Message-Boundary"
Content-transfer-encoding: 7BIT
X-attachments: verilog-mode.el.gz
--Message-Boundary
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
+----------------------------------------------------------------+
| Here is version $rev of verilog-mode for emacs! |
+----------------------------------------------------------------+
XX
open(IO, "<README");
while (<IO>){
print O $_;
}
print O "\nLast few changes to the verilog-mode:\n";
while(<LOG>) {
$log++ if (/^----------------------------$/);
print C $_;
last if ($log > 10);
print O $_;
}
while(<LOG>) {
print C $_;
}
close(LOG);
print O <<"XX";
--Message-Boundary
Content-type: application/octet-stream; name="$attach_name"
Content-Transfer-Encoding: base64
Content-disposition: attachment; filename="$attach_name"
$encoded_data
--Message-Boundary--
XX
close(O);
unlink("log");