Dynamically works out which version of n98-magerun to use for different Magento versions based on current directory.
- Install n98-magerun and n98-magerun2 into /usr/local/bin
#install n98-magerun
wget https://files.magerun.net/n98-magerun.phar
chmod +x ./n98-magerun.phar
sudo cp ./n98-magerun.phar /usr/local/bin/
#install n98-magerun2
wget https://files.magerun.net/n98-magerun2.phar
chmod +x ./n98-magerun2.phar
sudo cp ./n98-magerun2.phar /usr/local/bin/
- Install this script
chmod +x ./n98
ln -s $(pwd)/n98 /usr/local/bin/n98
- Navigate to project root.
- Run n98.
- Just git pull to get the latest version