projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[BackupPC.git]
/
bin
/
BackupPC_attribPrint
diff --git
a/bin/BackupPC_attribPrint
b/bin/BackupPC_attribPrint
index
47ecf79
..
659abdd
100755
(executable)
--- a/
bin/BackupPC_attribPrint
+++ b/
bin/BackupPC_attribPrint
@@
-1,4
+1,4
@@
-#!/bin/perl
+#!/
usr/
bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_attribPrint: print the contents of attrib files.
#============================================================= -*-perl-*-
#
# BackupPC_attribPrint: print the contents of attrib files.
@@
-13,7
+13,7
@@
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2005 Craig Barratt
+# Copyright (C) 2005
-2009
Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@
-31,7
+31,7
@@
#
#========================================================================
#
#
#========================================================================
#
-# Version
2.1.0, released 20 Jun 2004
.
+# Version
3.2.0, released 31 Jul 2010
.
#
# See http://backuppc.sourceforge.net.
#
#
# See http://backuppc.sourceforge.net.
#
@@
-61,7
+61,17
@@
if ( !-f $ARGV[0] ) {
}
my $attrib = BackupPC::Attrib->new({ compress => $Conf{CompressLevel} });
}
my $attrib = BackupPC::Attrib->new({ compress => $Conf{CompressLevel} });
-if ( !$attrib->read(".", $ARGV[0]) ) {
+
+my($dir, $file);
+
+if ( $ARGV[0] =~ m{(.+)/(.+)} ) {
+ $dir = $1;
+ $file = $2;
+} else {
+ $dir = $ARGV[0];
+}
+
+if ( !$attrib->read($dir, $file) ) {
print STDERR "Cannot read attrib file $ARGV[0]\n";
exit(1);
}
print STDERR "Cannot read attrib file $ARGV[0]\n";
exit(1);
}