Permalink
Browse files

[FIX] release script fixed to retain original newlines in scripts

  • Loading branch information...
ChristianGruen committed Oct 23, 2011
1 parent e5bcca0 commit 3b923490c41222410fc96222d86c63eb67bdc58c
Showing with 4 additions and 1 deletion.
  1. +4 −1 release.pl
View
@@ -55,14 +55,17 @@ sub prepare {
next if -d $f;
(my $n = $f) =~ s|.*/||;
open(my $in, $f);
+ binmode $in;
open(my $out, ">".$release."/bin/$n");
+ binmode $out;
while(my $l = <$in>) {
if($l =~ m|\.\./\.\./|) {
# basexhttp.bat: replace "%PWD%/../../basex/target/classes" with "basex-api.jar"
next if $l !~ s|%PWD%/\.\./\.\./basex/target/classes|%LIB%/basex-api.jar|;
}
$l =~ s|target/classes|BaseX.jar|;
print $out $l;
+ #print $out ($f =~ /.bat$/ ? "\r\n" : "\n");
}
close($in);
close($out);
@@ -310,6 +313,6 @@ sub finish {
move("$release/basex.war", "$release/BaseX$v.war");
move("$release/BaseX.exe", "$release/BaseX$v.exe");
unlink("$release/basex-api.jar");
- unlink(glob("$release/bin/*"));
+ #unlink(glob("$release/bin/*"));
rmdir("$release/bin");
}

0 comments on commit 3b92349

Please sign in to comment.