forked from zao/foo_wave_seekbar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_release.pl
More file actions
67 lines (60 loc) · 1.37 KB
/
make_release.pl
File metadata and controls
67 lines (60 loc) · 1.37 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
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
use strict;
use Data::Dumper;
use File::Path qw(make_path remove_tree);
use File::Spec qw(rel2abs);
use File::chdir;
use File::Copy;
use File::Glob qw(:glob);
my $temp_dir = "build";
sub pub {
if (@_) {
system("pscp -i C:/uni.ppk @_ zao\@hirohito.acc.umu.se:public_html/");
}
}
sub archive {
my $pack = '7za.exe';
my $target = File::Spec->rel2abs($_[0]);
my $rwut = $_[1];
foreach my $v (@$rwut) {
my $dst = "$temp_dir/";
my @files = bsd_glob($v);
make_path($dst);
foreach my $file (@files) {
copy($file, $dst);
}
}
{
local $CWD = $temp_dir;
system("$pack a -tzip -mx9 -mmt \"$target\" *");
}
remove_tree($temp_dir);
}
my $comp_dir = 'user-components/foo_wave_seekbar';
my $release;
if (-1 != $#ARGV)
{
$release = $ARGV[0];
} else {
print 'Release version: ';
chomp($release = <>);
}
my $rel_file = "foo_wave_seekbar-$release.fb2k-component";
my $arch_file = "foo_wave_seekbar-$release-archive.fb2k-component";
if (!-e $rel_file) {
&archive($rel_file, [
"$comp_dir/msvcp120.dll",
"$comp_dir/msvcr120.dll",
"$comp_dir/SciLexer.dll",
"$comp_dir/frontend_*.dll",
"$comp_dir/foo_wave_seekbar.dll"]);
&pub($rel_file);
}
if (!-e $arch_file) {
&archive($arch_file, [
"$comp_dir/msvcp120.dll",
"$comp_dir/msvcr120.dll",
"$comp_dir/SciLexer.*",
"$comp_dir/frontend_*.*",
"$comp_dir/foo_wave_seekbar.*"]);
&pub($arch_file);
}