Skip to content

Instantly share code, notes, and snippets.

View jacquesbh's full-sized avatar
🏠
Working from home

Jacques Bodin-Hullin jacquesbh

🏠
Working from home
View GitHub Profile
#!/bin/bash
# CREATE BACKUPS BEFORE RUNNING THIS SCRIPT!
# RUN THIS SCRIPT IN THE MAIN DIR OF YOUR APPLICATION (where the app/ is located)
for m in $(find app/ -iname Mage.php); do
cd $(dirname $(dirname $m)) || (echo && continue) # old locate db
MAGE_VERSION=$(php -d error_reporting=0 -r "require 'app/Mage.php'; Mage::app(); echo Mage::getVersion();")
if echo $MAGE_VERSION | egrep -q "^[0-9.]+$"; then