« first day (4736 days earlier)      last day (63 days later) » 

5:11 PM
2
Q: What should be next for community events?

SpencerGRecently, we announced the end of Winter/Summer Bash. I posted an answer there, sharing that I was tasked with looking into what could be next to bring the community together. To that end, we would love to hear about what kinds of network-wide events you would enjoy. We don’t have a concrete dire...

 
 
3 hours later…
8:16 PM
thanks @Kusalananda unfortunately I don't think that works for my actual script :(
specifically line 215 where if the -a option is used I query a firmware repository that will give me a list of available firmware types
I'll try to update my question
 
8:44 PM
Thinking...
 
me trying to explain my code
sorry I was trying to post a simplified version of the problem and didn't anticipate that being an issue
@Kusalananda I want whatever the endpoint returns to be kept, I'm not currently supporting all update types but the goal is for them to be. I'm also not doing any checking on manually set options but I figure if they are being intentionally used it's not as important
for example if I run ./script -Bn <id> and the server does not have BIOS firmware available it will error that there is no firmware found but I would prefer it not to error about all the possible firmware types every time I use -a
 
So use the stuff returned by the endpoint, and add the ones from the command line if -a is used?
 
no the endpoint only gets used if -a is used so when -a is used any other options are ignored essentially
 
I'm trying to formulate it in simple if-then-else terms.
Aha
Ok.
Easy
 
but I still want BMC to be last even if it's returned by -a
 
8:58 PM
Not easy
 
I got close but I would just have to remove the null element created
if [[ "${options[@]}" =~ BMC ]]; then
	options=("${options[@]/BMC/}" BMC)
fi
or if there is a way to do that without creating the null element
 
I have a solution. Just need to edit my answer around it.
 

« first day (4736 days earlier)      last day (63 days later) »