Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jacques Bodin-Hullin jacquesbh

🏠
Working from home
View GitHub Profile
View patchMagentos.sh
#!/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