Commit ed864216 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Code comment & whitespace cleanup

parent 07c930d4
...@@ -95,10 +95,10 @@ use constant { ...@@ -95,10 +95,10 @@ use constant {
# Main config # Main config
my %config = ( my %config = (
'log-level' => LOG_NOTICE, 'log-level' => LOG_NOTICE,
'tar' => 'tar', 'tar' => 'tar',
'exclude-system' => 0, 'exclude-system' => 0,
'backup-upgrade' => 0, 'backup-upgrade' => 0
); );
# Choose default compression method # Choose default compression method
if (-x "/bin/xz" || -x "/usr/bin/xz") { if (-x "/bin/xz" || -x "/usr/bin/xz") {
...@@ -109,9 +109,6 @@ if (-x "/bin/xz" || -x "/usr/bin/xz") { ...@@ -109,9 +109,6 @@ if (-x "/bin/xz" || -x "/usr/bin/xz") {
print(STDERR "DBackup v$VERSION, Copyright (c) 2010-2014, AllWorldIT\n\n"); print(STDERR "DBackup v$VERSION, Copyright (c) 2010-2014, AllWorldIT\n\n");
...@@ -1059,9 +1056,6 @@ sub restore ...@@ -1059,9 +1056,6 @@ sub restore
our ($source,$dest) = @_; our ($source,$dest) = @_;
# State infor for current dir # State infor for current dir
# our %doBackup;
# our %srcFileList;
# our %srcDirList;
our %origFileList; our %origFileList;
our %origDirList; our %origDirList;
our %origPathAttribs; our %origPathAttribs;
...@@ -1454,6 +1448,7 @@ sub loadStateFile { ...@@ -1454,6 +1448,7 @@ sub loadStateFile {
} }
# Remove backup and its sequences
sub removeBackups sub removeBackups
{ {
my ($path,$format,$compression,$seqs) = @_; my ($path,$format,$compression,$seqs) = @_;
...@@ -1497,6 +1492,8 @@ sub removeBackups ...@@ -1497,6 +1492,8 @@ sub removeBackups
} }
} }
# Convert a possible string to an array, or return the array if it is indeed an array
sub toArray sub toArray
{ {
my $param = shift; my $param = shift;
...@@ -1508,6 +1505,8 @@ sub toArray ...@@ -1508,6 +1505,8 @@ sub toArray
} }
} }
# Grab tar version
sub getTarVer sub getTarVer
{ {
my $tar = shift; my $tar = shift;
...@@ -1533,6 +1532,8 @@ sub getTarVer ...@@ -1533,6 +1532,8 @@ sub getTarVer
return $tarVer; return $tarVer;
} }
# Convert a triplet version into an integer
sub getNumericVer sub getNumericVer
{ {
my $a = shift; my $a = shift;
...@@ -1547,4 +1548,6 @@ sub getNumericVer ...@@ -1547,4 +1548,6 @@ sub getNumericVer
return ( ($a[0]*1000000) + ($a[1]*1000) + $a[2] ); return ( ($a[0]*1000000) + ($a[1]*1000) + $a[2] );
} }
# vim: ts=4 # vim: ts=4
Supports Markdown
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