Last active
May 29, 2019 14:56
-
-
Save StenHigh/16c380a7ca18297d11987230d642c5ef to your computer and use it in GitHub Desktop.
magento update static content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
while getopts d:e option | |
do | |
case "${option}" | |
in | |
d) DIRECTORY="${OPTARG}";; | |
e) ENV="${OPTARG}";; | |
esac | |
done | |
if [ -z ${DIRECTORY+x} ]; then | |
DIRECTORY = "/var/www/html/magento_dev" | |
fi | |
cwd=$(pwd) | |
if [ $cwd = $DIRECTORY ]; then | |
rm -rf pub/static/frontend/ | |
echo -en '\033[0;32mdirectory "pub/static/frontend/\033[0m \n' | |
php bin/magento setup:static-content:deploy sv_SE | |
echo -en '\033[0;32mfrontend static created\033[0m \n' | |
rm -rf pub/static/adminhtml/ | |
echo -en '\033[0;32mdirectory "pub/static/adminhtml/\033[0m \n' | |
php bin/magento setup:static-content:deploy -t Magento/backend | |
echo -en '\033[0;32mfrontend static created\033[0m \n' | |
echo -en '\033[0;32all static is update\033[0m \n' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment