forked from therion/therion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakebinary.pl
More file actions
38 lines (35 loc) · 1.05 KB
/
makebinary.pl
File metadata and controls
38 lines (35 loc) · 1.05 KB
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
$platform = lc($ARGV[0]);
#($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time);
#$year += 1900;
#$mon += 1;
#$datestr = sprintf("%04d%02d%02d",$year,$mon,$mday);
if (open(VFL,"thversion.h")) {
@verfl = <VFL>;
$verfl[0] =~ /(\d+)\.(\d+)\.(\d+)/;
($v1,$v2,$v3) = ($1,$2,$3);
close(VFL);
} else {
$v1 = 0;
$v2 = 2;
$v3 = 1;
}
$dd = "therion-temp";
$d = "../$dd";
system("mkdir $d");
system("cp ./therion $d");
system("cp ./install $d");
system("cp ./therion.ini $d");
system("cp ./xtherion/xtherion $d");
system("cp ./xtherion/xtherion.ini $d");
system("cp ./thbook/thbook.pdf $d");
system("cp ./man/therion.1 $d");
system("cp ./man/xtherion.1 $d");
system("cp ./README $d");
system("cp ./COPYING $d");
if ($platform eq "win32") {
system("zip -jr ../therion-$platform-$v1.$v2.$v3.zip $d");
} else {
system("tar -cvf ../therion-linux.i386-$v1.$v2.$v3.tar -C $d install therion therion.ini xtherion xtherion.ini thbook.pdf therion.1 xtherion.1 README COPYING");
system("gzip -f ../therion-linux.i386-$v1.$v2.$v3.tar");
}
system("rm -R $d");