使用SSH升级Magento

Please can someone tell me step by step process to upgrade magento to latest version using SSH shell

I have tried to upgrade using following commands. which I used from below tutorials

chmod +x mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage sync
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
php shell/indexer.php reindexall
rm -rf downloader/.cache/ var/cache/

http://www.crucialwebhost.com/kb/upgrading-magento-via-ssh/

and ssh was giving success message but after indexing and flushing cache.

Magento admin footer still showing old version.

Thanks