Browse Source

Merge pull request #329 from piotrkwiecinski/download-enterprise

support for magento 2 enterprise download
Mark Shust 4 years ago
parent
commit
15428571c5
1 changed files with 8 additions and 0 deletions
  1. 8 0
      compose/bin/download

+ 8 - 0
compose/bin/download

@@ -1,6 +1,14 @@
 #!/bin/bash
 #!/bin/bash
 [ -z "$1" ] && echo "Please specify the version to download (ex. 2.0.0)" && exit
 [ -z "$1" ] && echo "Please specify the version to download (ex. 2.0.0)" && exit
 
 
+edition=${2:-community}
+
+if [[ "$edition" == "enterprise" ]]; then
+    rm -rf src
+    composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-enterprise-edition=$1 src
+    exit 0
+fi
+
 if [ ! -f ~/.docker-magento/magento2-$1.tar.gz ]; then
 if [ ! -f ~/.docker-magento/magento2-$1.tar.gz ]; then
     mkdir -p ~/.docker-magento
     mkdir -p ~/.docker-magento
     (cd ~/.docker-magento && curl -OL http://pubfiles.nexcess.net/magento/ce-packages/magento2-$1.tar.gz)
     (cd ~/.docker-magento && curl -OL http://pubfiles.nexcess.net/magento/ce-packages/magento2-$1.tar.gz)