Correct for change in Odoo repository

When I first tried your script, it failed because Odoo seems to have removed their sample openerp-server-conf file to a different sub-directory.

I noticed you were using *sed* patching and *cat* appending to that and other files.  In my experience the "here document" is a much more readable and maintainable alternative, so I changed it to do that.  Then I found my self wanting to add a few more tricks that make scripts more maintainable &/or less work.

My changes include : 
 - make calls to GitHub idempotent
 - make mkdir calls idempotent
 - put complicated command groups into functions for improved readability.
 - force user to run script as root thus eliminating dependence on "sudo"
 - call apt-get less often if running the script repeatedly (debugging)
 - fix missing quote
 - remove superfluous white space

Thanks for providing your script in the first place! It helped me ensure that my understanding of the new file hierarchy in GitHub is correct.