Skip to content

Commit

Permalink
Overwrite existing files
Browse files Browse the repository at this point in the history
These may be created when things don't go perfectly.
  • Loading branch information
AlexDaniel committed Jan 25, 2018
1 parent 3e00148 commit 13eeae8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintenance/long-term-storage.p6
Expand Up @@ -78,8 +78,14 @@ sub pack-it {
my $large-archive-path = {ARCHIVES-LOCATION}/$sha.lrz;

my $proc = run :out, :bin, tar, cf, -, --absolute-names, --remove-files, --, |@paths;
if $large-archive-path.IO.e {
$large-archive-path.IO.unlink # remove existing (just in case)
}
if run :in($proc.out), :bin, lrzip, -q, -L, 9, -o, $large-archive-path {
for @pack {
if {ARCHIVES-LOCATION}/$_.IO.e {
{ARCHIVES-LOCATION}/$_.IO.unlink # remove existing (just in case)
}
$large-archive-path.IO.symlink({ARCHIVES-LOCATION}/$_);
unlink {ARCHIVES-LOCATION}/$_.zst
}
Expand Down

0 comments on commit 13eeae8

Please sign in to comment.