Skip to content
Snippets Groups Projects
Commit 737b5879 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

apply.pl now does not die() when the target directory already

exists, it will come up with a unique name.  usage_apply() in
aux.pm updated to reflect this.
parent 8a552edf
No related branches found
No related tags found
No related merge requests found
......@@ -52,9 +52,8 @@ my $delta_dir = sprintf "%s/%s_%s_delta_%s", $dst_prefix, $db, $v1, $v2;
die $! if (! -d $v1_dir);
die $! if (! -d $delta_dir);
if (-d $v2_dir) {
printf STDERR "Whoa, the directory '%s' already exists\n", $v2_dir;
die $!;
while (-d $v2_dir) {
$v2_dir = sprintf "%s.%04d", $v2_dir, int(rand(10000));
}
printf STDERR "Creating the directory '%s'\n", $v2_dir;
......
......@@ -86,7 +86,8 @@ The options may be any of these:
Default: "$opts->{'s'}"
-d path Path to the directory holding the old version of the
database, and where the new version of the database
should be created.
should be created. The new database directory will be
given a unique name.
Default: "$opts->{'d'}"
EOT
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment