bin/d3admin in depot3-3.0.8 vs bin/d3admin in depot3-3.0.9
- old
+ new
@@ -1,7 +1,6 @@
#!/usr/bin/ruby
-
### Copyright 2016 Pixar
###
### Licensed under the Apache License, Version 2.0 (the "Apache License")
### with the following modification; you may not use this file except in
### compliance with the Apache License and the following modification to it:
@@ -133,10 +132,13 @@
###
### @return [void]
###
def parse_commandline
+ # Debugging file? if so, always set debug.
+ ARGV << "--debug" if D3::DEBUG_FILE.exist?
+
# this holds everything that comes from the commandline
# or from prompting the user
@options = OpenStruct.new
# cli option defaults
@@ -243,32 +245,32 @@
elsif arg =~ /^y(es)?$/i
@options.reboot = "y"
else
raise ArgumentError, "--reboot must be 'y' or 'n'"
end
-
+
when '--remove-first'
# dft is no, so if arg is empty or /^n(o)$/i, it should be nil,
# otherwise must be /^y(es)$/i
if arg.empty? or arg =~ /^no?$/i
@options.remove_first = "n"
elsif arg =~ /^y(es)?$/i
@options.remove_first = "y"
else
raise ArgumentError, "--remove-first must be 'y' or 'n'"
end
-
+
when '--removable'
# dft is yes, so if arg is empty or /^y(es)$/i, it should be nil,
# otherwise must be /^n(o)$/i
if arg.empty? or arg =~ /^y(es)?$/i
@options.removable = "y"
elsif arg =~ /^no?$/i
@options.removable = "n"
else
raise ArgumentError, "--removable must be 'y' or 'n'"
end
-
+
when '--oses'
@options.oses = arg
when '--expiration'
@options.expiration = arg
when '--expiration-path'