I cant remember why its so complicated. I looked at the history and you commented in May 2015 after a change that someone sent me which added all the complication
https://github.com/rogerclarkmelbourne/ ... 2c44c66cbd
My original script just did the upload and didnt mess with USB
As the change wasnt via PR, I will need to try to track down who sent me the changes and why they thought they were necessary
I think this may be another case where I ended up with code in the repo that only suits one person.
Hence my current retiscence to make any changes unless they are a bug fix, e.g. recent PR by @bigjonson which reduced serial upload speed just because it didnt happen to work for him due to a out of date driver file.
In this case, I agree, the change was probably unncessary and we should probably go back to my one liner