projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
16826: Moves configuration set-up to TestCase's setup() method.
[arvados.git]
/
services
/
api
/
script
/
salvage_collection.rb
diff --git
a/services/api/script/salvage_collection.rb
b/services/api/script/salvage_collection.rb
index 3212d8862d218fdc39b3f4bbe087297f6f1934bb..c5f798bd2176c8b6038f71b48a3ece49244dd864 100755
(executable)
--- a/
services/api/script/salvage_collection.rb
+++ b/
services/api/script/salvage_collection.rb
@@
-1,4
+1,7
@@
#!/usr/bin/env ruby
#!/usr/bin/env ruby
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
# Take two input parameters: a collection uuid and reason
# Get "src_collection" with the given uuid
# Take two input parameters: a collection uuid and reason
# Get "src_collection" with the given uuid
@@
-10,10
+13,11
@@
# Append to src_collection.name: " (reason; salvaged data at new_collection.uuid)"
# Set portable_data_hash to "d41d8cd98f00b204e9800998ecf8427e+0"
# Append to src_collection.name: " (reason; salvaged data at new_collection.uuid)"
# Set portable_data_hash to "d41d8cd98f00b204e9800998ecf8427e+0"
-require '
trollop
'
+require '
optimist
'
require './lib/salvage_collection'
require './lib/salvage_collection'
+include SalvageCollection
-opts =
Trollop
::options do
+opts =
Optimist
::options do
banner ''
banner "Usage: salvage_collection.rb " +
"{uuid} {reason}"
banner ''
banner "Usage: salvage_collection.rb " +
"{uuid} {reason}"
@@
-23,9
+27,4
@@
opts = Trollop::options do
end
# Salvage the collection with the given uuid
end
# Salvage the collection with the given uuid
-begin
- SalvageCollection.salvage_collection opts.uuid, opts.reason
-rescue => e
- $stderr.puts "Error during arv-put"
- exit 1
-end
+SalvageCollection.salvage_collection opts.uuid, opts.reason