Here is my take on the single line word press upgrade I saw at hack a day.
The bellow will download the latest version and unpack it. IT then removes the new plugins and themes as to not over wright your installed ones. IT then copies the new install over the old one and resets the permissions on the files.
wget http://wordpress.org/latest.zip && unzip latest.zip && rm -rf ./wordpress/wp-content/ && cp -r ./wordpress/* ../
You may need to change the paths for your installation but this should work quite well.
As allways take a backup before you run this just in case.