Code for importing openstreetmap data.
bash osx_install_dependencies.sh
bash linux_install_dependencies.sh
See http://download.geofabrik.de for the list of links for subregions (or click on the subregion name for individual country download links). Make sure you get the .osm.bz2 format file. I include the ones I use here in osm_import.sh by way of example.