Changeset 11288
- Timestamp:
- Jan 24, 2007, 5:39:31 PM (19 years ago)
- Location:
- trunk/DataStore
- Files:
-
- 3 edited
-
Changes (modified) (1 diff)
-
lib/DataStore.pm (modified) (2 diffs)
-
scripts/dsleech (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/Changes
r10249 r11288 4 4 - fix dsleech to handle valid but empty filesets 5 5 - change dsfilesetls to output "extra" fields 6 - add --overwrite option to dsleech 6 7 7 8 0.05 Fri Sep 1 11:28:13 HST 2006 -
trunk/DataStore/lib/DataStore.pm
r8728 r11288 1 1 # Copyright (C) 2006 Joshua Hoblitt 2 2 # 3 # $Id: DataStore.pm,v 1. 8 2006-09-01 21:19:04jhoblitt Exp $3 # $Id: DataStore.pm,v 1.9 2007-01-25 03:39:31 jhoblitt Exp $ 4 4 5 5 package DataStore; … … 9 9 10 10 use vars qw($VERSION); 11 $VERSION = '0.0 5';11 $VERSION = '0.06'; 12 12 13 13 =pod -
trunk/DataStore/scripts/dsleech
r9827 r11288 3 3 # Copyright (C) 2006 Joshua Hoblitt 4 4 # 5 # $Id: dsleech,v 1. 4 2006-11-02 03:15:08jhoblitt Exp $5 # $Id: dsleech,v 1.5 2007-01-25 03:39:31 jhoblitt Exp $ 6 6 7 7 use strict; … … 24 24 'uri|u=s' => \$uri, 25 25 'last_fileset|l=s' => \$last_fileset, 26 'overwrite|o' => \$overwrite, 26 27 'recall' => \$recall, 27 28 'remember' => \$remember, … … 71 72 } 72 73 73 process_filesets($filesets, $dir, $ verbose) or die "failed to process filesets";74 process_filesets($filesets, $dir, $overwrite, $verbose) or die "failed to process filesets"; 74 75 75 76 # if we got this far we're assuming that the downloads completed and we can … … 86 87 sub process_filesets 87 88 { 88 my ($filsets, $dir, $ verbose) = @_;89 my ($filsets, $dir, $overwrite $verbose) = @_; 89 90 90 91 foreach my $fileset (@$filesets) { … … 104 105 } 105 106 106 if (!process_files($files, $dir, $ verbose)) {107 if (!process_files($files, $dir, $overwrite, $verbose)) { 107 108 warn "failed to process files"; 108 109 return; … … 115 116 sub process_files 116 117 { 117 my ($files, $dir, $ vebose) = @_;118 my ($files, $dir, $overwrite, $vebose) = @_; 118 119 119 120 foreach my $file (@$files) { … … 137 138 # make sure that filename doesn't already exist 138 139 if (-e $filename) { 139 warn "file $filename already exists, skipping..."; 140 next; 140 if ($overwrite) { 141 warn "file $filename already exists, overwriting..."; 142 } else { 143 warn "file $filename already exists, skipping..."; 144 next; 145 } 141 146 } 142 147 … … 226 231 This flag is optional. 227 232 233 =item * --overwrite 234 235 If a file already exists, overwrite it. 236 237 This flag is optional. 238 228 239 =item * --recall 229 240
Note:
See TracChangeset
for help on using the changeset viewer.
