大米CMS官网论坛,大米站长联盟,大米站长之家,大米开发者社区

标题: magento2发布linu简单脚本mage.sh [打印本页]

作者: 追影    时间: 2018-7-13 14:49
标题: magento2发布linu简单脚本mage.sh
  1. #!/bin/bash

  2. action=$1
  3. root_path=/www/wwwroot/cn-pricerite-magento2

  4. if [ "${action}" == "clean" ];then
  5.     rm -rf ${root_path}/pub/static/frontend
  6.     rm -rf ${root_path}/var/view_preprocessed/pub/static/frontend
  7.     php ${root_path}/bin/magento cache:clean
  8. elif [ "${action}" == "upgrade" ];then
  9.     php ${root_path}/bin/magento setup:upgrade
  10. elif [ "${action}" == "compile" ];then
  11.     php /home/website/magentoee220/bin/magento setup:di:compile
  12. elif [ "${action}" == "deploy" ];then
  13.     php ${root_path}/bin/magento setup:static-content:deploy -f en_US
  14.     php ${root_path}/bin/magento setup:static-content:deploy -f zh_Hant_HK
  15. elif [ "${action}" == "chown" ];then
  16.     chown -R www:www ${root_path}
  17. elif [ "${action}" == "chmod" ];then
  18.     chmod -R 777 ${root_path}
  19. else
  20.     php ${root_path}/bin/magento ${action}
  21. fi
复制代码







欢迎光临 大米CMS官网论坛,大米站长联盟,大米站长之家,大米开发者社区 (https://www.damicms.com/bbs/) Powered by Discuz! X3.1