mirror of https://github.com/perkeep/perkeep.git
Remove some ancient Perl scripts.
Change-Id: If98021d39eb8560913bc1ba35f4cb7f29f25974c
This commit is contained in:
parent
f41a431595
commit
dd3516c6ee
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
my $file = shift;
|
||||
die "$file doesn't exist" unless -e $file;
|
||||
|
||||
open(my $fh, $file) or die "failed: $!\n";
|
||||
my $c = do { local $/; <$fh> };
|
||||
close($fh);
|
||||
|
||||
my $changes = 0;
|
||||
|
||||
$changes = 1 if $c =~ s!^(\s+)\"camli/(.+)\"!$1\"perkeep.org/pkg/$2\"!mg;
|
||||
$changes = 1 if $c =~ s!^(\s+)\"camlistore/(.+)\"!$1\"camlistore.org/$2\"!mg;
|
||||
$changes = 1 if $c =~ s!^(\s+_ )\"camlistore/(.+)\"!$1\"camlistore.org/$2\"!mg;
|
||||
$changes = 1 if $c =~ s!/pkg/pkg/!/pkg/!g;
|
||||
$changes = 1 if $c =~ s!camlistore.org/pkg/third_party/!camlistore.org/third_party/!g;
|
||||
|
||||
exit 0 unless $changes;
|
||||
|
||||
open(my $fh, ">$file") or die;
|
||||
print $fh $c;
|
||||
close($fh);
|
||||
print STDERR "rewrote $file\n";
|
|
@ -1,47 +0,0 @@
|
|||
use strict;
|
||||
use Time::HiRes ();
|
||||
use FindBin qw($Bin);
|
||||
|
||||
sub build_bin {
|
||||
my $target = shift;
|
||||
my $final_bin = find_bin($target);
|
||||
if ($ENV{CAMLI_FAST_DEV}) {
|
||||
return $final_bin;
|
||||
}
|
||||
|
||||
my $full_target = $target;
|
||||
$full_target =~ s!^\./((cmd|server)/(\w+))$!camlistore.org/$1! or die "Bogus target $target";
|
||||
|
||||
my $mtime = 0;
|
||||
if (-f $final_bin) {
|
||||
$mtime = (stat($final_bin))[9];
|
||||
}
|
||||
|
||||
print STDERR "Building $full_target ...\n";
|
||||
my $t0 = Time::HiRes::time();
|
||||
system("go", "run", "make.go",
|
||||
"--quiet",
|
||||
"--embed_static=false",
|
||||
"--sqlite=false",
|
||||
"--if_mods_since=$mtime",
|
||||
"--targets=$full_target")
|
||||
and die "go install $target failed";
|
||||
my $td = Time::HiRes::time() - $t0;
|
||||
|
||||
print STDERR "Build/init took " . sprintf("%0.03f", $td) . " seconds.\n";
|
||||
|
||||
return $final_bin;
|
||||
}
|
||||
|
||||
sub find_bin {
|
||||
my $target = shift;
|
||||
$target =~ s!.+/!!;
|
||||
my $bin = find_gobin();
|
||||
return "$bin/$target";
|
||||
}
|
||||
|
||||
sub find_gobin {
|
||||
return "$Bin/bin";
|
||||
}
|
||||
|
||||
1;
|
Loading…
Reference in New Issue