Wrap install in a function to avoid closed connection issues when piping curl into bash