summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBradley M. Kuhn <bkuhn@ebb.org>2012-11-25 14:36:29 -0500
committerBradley M. Kuhn <bkuhn@ebb.org>2012-11-26 13:54:48 -0500
commit32e51f65a19d030363f9c5d29472c59b2df0cccd (patch)
tree64bbb54d6380c75afd7927cbc86a2bdf13437c42 /contrib
parent10d3f5593302b07897f88d7b9c771558af4a2738 (diff)
downloadfork-ledger-32e51f65a19d030363f9c5d29472c59b2df0cccd.tar.gz
fork-ledger-32e51f65a19d030363f9c5d29472c59b2df0cccd.tar.bz2
fork-ledger-32e51f65a19d030363f9c5d29472c59b2df0cccd.zip
Verify that files are not duplicated in the MANIFEST.
Keep a hash so that file output to the MANIFEST file doesn't have duplicates of the same file name in it.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/non-profit-audit-reports/general-ledger-report.plx4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/non-profit-audit-reports/general-ledger-report.plx b/contrib/non-profit-audit-reports/general-ledger-report.plx
index 192be350..d1c92975 100755
--- a/contrib/non-profit-audit-reports/general-ledger-report.plx
+++ b/contrib/non-profit-audit-reports/general-ledger-report.plx
@@ -96,6 +96,7 @@ print MANIFEST "general-ledger.txt\n";
open(GL_CSV_OUT, ">", "general-ledger.csv") or die "unable to write general-ledger.csv: $!";
print MANIFEST "general-ledger.csv\n";
+my %manifest;
foreach my $acct (@sortedAccounts) {
print GL_TEXT_OUT "\n\nACCOUNT: $acct\nFROM: $beginDate TO $formattedEndDate\n\n";
my @acctLedgerOpts = ('-V', '-F',
@@ -131,7 +132,8 @@ foreach my $acct (@sortedAccounts) {
my $file = $1;
next if $file =~ /^\s*$/;
warn "$file does not exist and/or is not readable" unless -r $file;
- print MANIFEST "$file\n";
+ print MANIFEST "$file\n" if not defined $manifest{$file};
+ $manifest{$file} = $line;
}
}
close(GL_CSV_DATA); die "error reading ledger output for chart of accounts: $!" unless $? == 0;