2008-05-07 02:32:46 +04:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# Arguments
|
|
|
|
##################################################################
|
|
|
|
|
|
|
|
$targetFolder = "deploy";
|
2013-03-07 01:27:21 +04:00
|
|
|
$suffix = "165";
|
2008-05-07 02:32:46 +04:00
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# Copies tree into target folder, preprocess .phps
|
|
|
|
##################################################################
|
|
|
|
|
|
|
|
sub process_dir($$) {
|
|
|
|
my ($from,$to) = @_;
|
|
|
|
opendir(DIR, $from) || die "can't opendir $from: $!";
|
|
|
|
my @content = readdir(DIR);
|
|
|
|
closedir DIR;
|
|
|
|
mkdir $to;
|
|
|
|
|
2008-10-06 05:13:49 +04:00
|
|
|
for(grep { -f "$from/$_" && ($_ !~ /^\./ || $_ eq ".htaccess" || $_ eq ".keep") } @content) {
|
2008-05-07 02:32:46 +04:00
|
|
|
my ($source,$target) = ("$from/$_","$to/$_");
|
|
|
|
|
|
|
|
open (IN,"$source");
|
|
|
|
binmode(IN);
|
|
|
|
open (OUT,">$target");
|
|
|
|
binmode(OUT);
|
|
|
|
print OUT $buffer while (read (IN,$buffer,65536));
|
|
|
|
}
|
|
|
|
|
|
|
|
for(grep { -d "$from/$_" && $_ !~ /^\./ } @content) {
|
|
|
|
process_dir("$from/$_","$to/$_");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# Main
|
|
|
|
##################################################################
|
|
|
|
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf $targetFolder`;
|
2008-05-07 02:32:46 +04:00
|
|
|
die "Target folder exists: $targetFolder" if -e $targetFolder;
|
|
|
|
|
|
|
|
process_dir("./webim", $targetFolder);
|
|
|
|
|
2009-08-10 19:52:48 +04:00
|
|
|
`rm -rf release$suffix`;
|
|
|
|
die "release folder exists: release$suffix" if -e "release$suffix";
|
|
|
|
mkdir "release$suffix";
|
|
|
|
|
2011-03-05 01:42:35 +03:00
|
|
|
chdir "$targetFolder";
|
2009-03-17 03:42:55 +03:00
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../release$suffix/mibew${suffix}_all.zip * .htaccess`;
|
2011-03-05 01:42:35 +03:00
|
|
|
|
|
|
|
chdir "locales";
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_cs.zip cs`;
|
2011-02-16 03:42:25 +03:00
|
|
|
`rm -rf cs`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_fi.zip fi`;
|
2011-02-16 03:42:25 +03:00
|
|
|
`rm -rf fi`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_da.zip da`;
|
2009-08-10 19:52:48 +04:00
|
|
|
`rm -rf da`;
|
|
|
|
|
2011-03-06 01:06:30 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_el.zip el`;
|
|
|
|
`rm -rf el`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_lv.zip lv`;
|
2009-08-10 19:52:48 +04:00
|
|
|
`rm -rf lv`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_fa.zip fa`;
|
2011-02-27 02:15:36 +03:00
|
|
|
`rm -rf fa`;
|
2009-08-10 19:52:48 +04:00
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_nl.zip nl`;
|
2011-02-27 02:15:36 +03:00
|
|
|
`rm -rf nl`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_th.zip th`;
|
2011-02-27 02:15:36 +03:00
|
|
|
`rm -rf th`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_ar.zip ar`;
|
2009-09-28 03:42:12 +04:00
|
|
|
`rm -rf ar`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_bg.zip bg`;
|
2011-02-16 03:42:25 +03:00
|
|
|
`rm -rf bg`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_ca.zip ca`;
|
2011-02-16 03:42:25 +03:00
|
|
|
`rm -rf ca`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_de.zip de`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf de`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_ru.zip ru`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf ru`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_ro.zip ro`;
|
2011-02-16 03:42:25 +03:00
|
|
|
`rm -rf ro`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_hu.zip hu`;
|
2011-02-16 03:42:25 +03:00
|
|
|
`rm -rf hu`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_fr.zip fr`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf fr`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_it.zip it`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf it`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_ka.zip ka`;
|
2011-02-27 02:15:36 +03:00
|
|
|
`rm -rf ka`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_pl.zip pl`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf pl`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_pt-br.zip pt-br`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf pt-br`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_sp.zip sp`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf sp`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_sv.zip sv`;
|
2011-02-16 03:42:25 +03:00
|
|
|
`rm -rf sv`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_ua.zip ua`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf ua`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_he.zip he`;
|
2009-04-24 02:40:59 +04:00
|
|
|
`rm -rf he`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_hr.zip hr`;
|
2009-07-15 03:27:20 +04:00
|
|
|
`rm -rf hr`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_tr.zip tr`;
|
2011-02-27 02:15:36 +03:00
|
|
|
`rm -rf tr`;
|
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_zh-cn.zip zh-cn`;
|
2009-09-28 03:42:12 +04:00
|
|
|
`rm -rf zh-cn`;
|
2009-03-17 03:42:55 +03:00
|
|
|
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../../release$suffix/mibew${suffix}_zh-tw.zip zh-tw`;
|
2009-03-17 03:42:55 +03:00
|
|
|
`rm -rf zh-tw`;
|
|
|
|
|
|
|
|
chdir "..";
|
2011-03-05 02:17:04 +03:00
|
|
|
`zip -r ../release$suffix/mibew$suffix.zip * .htaccess`;
|
2009-08-10 19:52:48 +04:00
|
|
|
|
|
|
|
chdir "..";
|
|
|
|
`rm -rf $targetFolder`;
|