Improved to use perl instead of sed for osx compatibility
Improved to install packages at once