9 Star 27 Fork 0

Gitee 极速下载/Webmin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/webmin/webmin
克隆/下载
perlpath.pl 577 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/local/bin/perl
# perlpath.pl
# This script gets run only from setup.sh in order to replace the
# #!/usr/local/bin/perl line at the start of scripts with the real path to perl
$ppath = $ARGV[0];
if ($ARGV[1] eq "-") {
@files = <STDIN>;
chop(@files);
}
else {
# Get files from command line
@files = @ARGV[1..$#ARGV];
}
foreach $f (@files) {
open(IN, "<".$f);
@lines = <IN>;
close(IN);
if ($lines[0] =~ /^#!\/\S*perl\S*(.*)/) {
open(OUT, ">".$f);
print OUT "#!$ppath$1\n";
for($i=1; $i<@lines; $i++) {
print OUT $lines[$i];
}
close(OUT);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Perl
1
https://gitee.com/mirrors/webmin.git
git@gitee.com:mirrors/webmin.git
mirrors
webmin
Webmin
master

搜索帮助