clean up the installation script and make it cross platform