Changeset 24374
- Timestamp:
- Jun 10, 2009, 4:17:26 PM (17 years ago)
- Location:
- trunk/DataStore
- Files:
-
- 3 edited
-
Changes (modified) (1 diff)
-
scripts/dsget (modified) (9 diffs)
-
t/07_file.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/Changes
r19602 r24374 7 7 - change ds*ls utilties to always return the HTTP status code - 300 as the 8 8 exit status 9 - add --xattr flag to dsget 9 10 10 11 0.07 Mon May 12 12:04:24 HST 2008 -
trunk/DataStore/scripts/dsget
r19742 r24374 1 1 #!/usr/bin/env perl 2 2 3 # Copyright (C) 2006-2008 Joshua Hoblitt 4 # 5 # $Id: dsget,v 1.35 2008-09-24 21:58:03 jhoblitt Exp $ 3 # Copyright (C) 2006-2009 Joshua Hoblitt 6 4 7 5 use strict; … … 9 7 10 8 use vars qw( $VERSION ); 11 $VERSION = '0.0 2';9 $VERSION = '0.03'; 12 10 13 11 use DataStore; … … 28 26 $server, 29 27 $compress, 30 $timeout 28 $timeout, 29 @xattrs, 31 30 ); 32 31 … … 43 42 'filename|f=s' => \$filename, 44 43 'compress|c' => \$compress, 45 'timeout|t=s' => \$timeout, 44 'timeout|t=s' => \$timeout, 45 'xattr|x=s' => \@xattrs, 46 46 ) or pod2usage( 2 ); 47 47 … … 159 159 require Nebulous::Client; 160 160 import Nebulous::Client; 161 require Nebulous::Util; 162 import Nebulous::Util qw( :standard ); 161 163 require File::Copy; 162 164 import File::Copy; … … 188 190 or die "Nebulous can't set xattr on key $filename"; 189 191 192 if (scalar @xattrs) { 193 write_xattrs($neb, $filename, @xattrs) 194 or die "Nebulous set xattrs on key $filename"; 195 } 196 190 197 open(my $src_fh, $tmpfilename) or die "can't open file $tmpfilename: $!"; 191 198 … … 230 237 231 238 dsget --uri <uri> --filename <filename> [--bytes <nbytes>] [--md5 <hex>] 232 [--compress] [--nebulous] [--volume <volume name>] [--copies <n>] 239 [--compress] [--nebulous] [--xattr user.<name>:<value>] 240 [--volume <volume name>] [--copies <n>] 233 241 234 242 =head1 DESCRIPTION … … 265 273 Optional. 266 274 275 =item * --xattr|-x 276 277 Flag to set a Nebulous xattr on C<--filename>. Can be specified more than 278 once. 279 280 Optional. 281 267 282 =item * --compress|-c 268 283 … … 306 321 =head1 COPYRIGHT 307 322 308 Copyright (C) 2006-200 8Joshua Hoblitt. All rights reserved.323 Copyright (C) 2006-2009 Joshua Hoblitt. All rights reserved. 309 324 310 325 This program is free software; you can redistribute it and/or modify it under -
trunk/DataStore/t/07_file.t
r6633 r24374 115 115 uri => "http://localhost:$port/somefile", 116 116 fileid => '12buckelyourshoe', 117 bytes => 9,117 bytes => 10, 118 118 md5sum => 'a0a6e1a375117c58d77221f10c5ce12e', 119 119 type => 'chip', … … 129 129 uri => "http://localhost:$port/somefile", 130 130 fileid => '12buckelyourshoe', 131 bytes => 9,131 bytes => 10, 132 132 md5sum => 'a0a6e1a375117c58d77221f10c5ce12e', 133 133 type => 'chip',
Note:
See TracChangeset
for help on using the changeset viewer.
