find . -type d -exec chmod 777 {} ;
rm -rf var/cache/* var/session/*
chmod 550 ./mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage list-installed
./mage list-upgrades
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
php shell/indexer.php reindexall
find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;