fix the osx script and add requirements