3 Star 4 Fork 6

Gitee 极速下载/logback

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/qos-ch/logback
克隆/下载
version.pl 766 Bytes
一键复制 编辑 原始数据 按行查看 历史
if ($#ARGV < 1) {
print "Usage: version.pl VER FILE {FILE, FILE}\n";
exit;
}
$V= $ARGV[0];
print "VER:$V\r\n";
shift(@ARGV);
sub replace () {
my $filename = $_[0];
if(-s $filename) {
print "Processing [" . $filename . "]\r\n";
my $origFile = "$filename.original";
rename($filename, $origFile);
open(OUT, ">$filename");
open(IN, "$origFile");
my $hitCount=0;
while(<IN>) {
if($hitCount == 0 && /<version>.*<\/version>/) {
s/<version>.*<\/version>/<version>$V<\/version>/;
$hitCount++;
}
print OUT;
}
close(IN);
close(OUT);
unlink($origFile);
} else {
print "File [" . $filename . "] does not exist\r\n"
}
}
foreach $ARG (@ARGV) {
do replace($ARG);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/logback.git
git@gitee.com:mirrors/logback.git
mirrors
logback
logback
master

搜索帮助