这段代码什么意思啊
下面这段代码好像是是perl脚本,没接触过,大家能不能帮着解释下,谢谢了。
#!/usr/bin/env perl
use Cwd qw(abs_path);
use File::Basename qw(dirname);
# include script functions
use vars qw(
$PREFIX
);
$PREFIX = abs_path(dirname($0));
require($PREFIX . "/functions.pl");
@profiles = ('default', 'full', 'dir');
if (-f $PREFIX . "/opennms-full-assembly/pom.xml") {
if (open (FILEIN, $PREFIX . "/opennms-full-assembly/pom.xml")) {
@profiles = ();
my $lastline = "";
while (my $line = <FILEIN>) {
chomp($line);
if ($lastline =~ /<name>build.profile<\/name>/) {
if ($line =~ /<value>(.*?)<\/value>/) {
push(@profiles, $1);
}
}
$lastline = $line;
}
close(FILEIN);
} else {
warning("unable to read from $PREFIX/opennms-full-assembly/pom.xml: $!");
}
}
if (not grep { $_ =~ /^-Dbuild.profile=/ } @ARGS) {
info("No build profile set, using the default. Possible profiles are: " . join(", ", @profiles));
push(@ARGS, '-Dbuild.profile=default');
}
if (not grep { $_ =~ /^[^-]/ } @ARGS) {
debug("no maven targets specified, adding 'install' to the command-line");
push(@ARGS, "install");
}
my @command = ($MVN, @ARGS);
info("changing working directory to $PREFIX/opennms-full-assembly");
chdir($PREFIX . "/opennms-full-assembly");
info("running:", @command);
handle_errors_and_exit(system(@command));
[解决办法]
看不懂
[解决办法]
没接触过就去学习一下吧:http://wenku.baidu.com/view/c8dbc908f12d2af90242e629.html
[解决办法]
楼主应该去http://bbs.csdn.net/forums/OL_Script里发这个帖子哦.
[解决办法]
这是java吗?还是什么语言啊?
[解决办法]