Advertisement
Guest User

Untitled

a guest
Sep 6th, 2017
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # Magento install variables
  4. dbhost="localhost"
  5. dbname="dbname"
  6. dbuser="dbuser"
  7. dbpass="dbpass"
  8. base_url="http://domain.com/"
  9. admin_firstname="FirstName"
  10. admin_lastname="LasteName"
  11. admin_email="email@domain.com"
  12. admin_username="admin"
  13. admin_pass="admin123+"
  14. language="en_US"
  15. backend_frontname="admin"
  16. mage_mode="developer"
  17.  
  18. while test $# -gt 0; do
  19. case "$1" in
  20. -h|--help)
  21. echo "options:"
  22. echo "-h, --help Show brief help"
  23. echo "-r, --run-instalation=DIR Run Instalation"
  24. echo "-rs, --run-instalation-sampledata=DIR Run instalation with sampledata"
  25. exit 0
  26. ;;
  27. -rs|--run-instalation-sampledata)
  28. shift
  29. echo Start composer instalation project;
  30. composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento;
  31. echo Start SampleData deploy;
  32. php -d memory_limit=-1 magento/bin/magento sampledata:deploy;
  33. echo Start Magento install;
  34. php -d memory_limit=-1 magento/bin/magento setup:install --base-url=$base_url --db-host=$dbhost --db-name=$dbname --db-user=$dbuser --db-password=$dbpass --admin-firstname=$admin_firstname --admin-lastname=$admin_lastname --admin-email=$admin_email --admin-user=$admin_username --admin-password=$admin_pass --language=$language --backend-frontname=$backend_frontname --use-sample-data --magento-init-params="MAGE_MODE=$mage_mode";
  35. echo Start compilation;
  36. php -d memory_limit=-1 magento/bin/magento setup:static-content:deploy;
  37. shift
  38. ;;
  39. -r|--run-instalation)
  40. shift
  41. echo Start composer instalation project;
  42. composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento;
  43. echo Start Magento install;
  44. php -d memory_limit=-1 magento/bin/magento setup:install --base-url=$base_url --db-host=$dbhost --db-name=$dbname --db-user=$dbuser --db-password=$dbpass --admin-firstname=$admin_firstname --admin-lastname=$admin_lastname --admin-email=$admin_email --admin-user=$admin_username --admin-password=$admin_pass --language=$language --backend-frontname=$backend_frontname --magento-init-params="MAGE_MODE=$mage_mode";
  45. echo Start compilation;
  46. php -d memory_limit=-1 magento/bin/magento setup:static-content:deploy;
  47. shift
  48. ;;
  49.  
  50. *)
  51. echo "The initialization process was not performed!"
  52. break
  53. ;;
  54. esac
  55. done
  56.  
  57. options:
  58. -h, --help Show brief help
  59. -r, --run-instalation=DIR Run Instalation
  60. -rs, --run-instalation-sampledata=DIR Run instalation with sampledata
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement