mirror of
https://github.com/fspc/dswim.git
synced 2026-09-16 08:31:39 -04:00
Makes sure these programs do backups for info in the right place.
This commit is contained in:
+4
-6
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
#use diagnostics;
|
||||
|
||||
require 5.004;
|
||||
use strict;
|
||||
|
||||
@@ -48,8 +48,6 @@ line.
|
||||
|
||||
=cut
|
||||
|
||||
my $home = $ENV{'HOME'} . "/";
|
||||
|
||||
if ($#ARGV == -1) {
|
||||
print STDERR "swim: imswim requires arguments, see program for instructions\n";
|
||||
exit;
|
||||
@@ -84,7 +82,7 @@ line.
|
||||
# humm let's rebuild the offending backup list, this
|
||||
# is important for --db.
|
||||
unshift(@redolist,"/.");
|
||||
open(REDOLIST, ">$home$ARGV[0]/backup/$the[0].list.bk.bk")
|
||||
open(REDOLIST, ">$ARGV[2]/$ARGV[0]/backup/$the[0].list.bk.bk")
|
||||
or warn "needed to edit $the[0].list because it lacked /.,
|
||||
but could not open up a backup file\n";
|
||||
my $rd;
|
||||
@@ -93,8 +91,8 @@ line.
|
||||
print REDOLIST "$rd\n";
|
||||
}
|
||||
close(REDOLIST);
|
||||
rename("$ARGV[0]/backup/$the[0].list.bk.bk",
|
||||
"$ARGV[0]/backup/$the[0].list.bk");
|
||||
rename("$ARGV[2]/$ARGV[0]/backup/$the[0].list.bk.bk",
|
||||
"$ARGV[2]/$ARGV[0]/backup/$the[0].list.bk");
|
||||
$_ = "/.";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user