Combine all software updates in a function

to keep the duplicate lines to a minimum