Преглед на файлове

prevent downloading 404 page content if file doesn't exist

Piotr Kwiecinski преди 4 години
родител
ревизия
8a8cc3b9a8
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      compose/bin/download

+ 3 - 3
compose/bin/download

@@ -3,16 +3,16 @@
 
 if [ ! -f ~/.docker-magento/magento2-$1.tar.gz ]; then
     mkdir -p ~/.docker-magento
-    (cd ~/.docker-magento && curl -OL http://pubfiles.nexcess.net/magento/ce-packages/magento2-$1.tar.gz)
+    (cd ~/.docker-magento && curl -fOL http://pubfiles.nexcess.net/magento/ce-packages/magento2-$1.tar.gz)
 fi
 
 # Fallback download to hypernode if archive doesn't exist on Nexcess (smaller than 1MB)
 if [ $(find ~/.docker-magento/magento2-$1.tar.gz -size -1M) ]; then
-    (cd ~/.docker-magento && curl -o magento2-$1.tar.gz -OL https://www.magento.mirror.hypernode.com/releases/magento-$1.tar.gz)
+    (cd ~/.docker-magento && curl -o magento2-$1.tar.gz -fOL https://www.magento.mirror.hypernode.com/releases/magento-$1.tar.gz)
 fi
 
 # Final fallback. If no archive exists, let's use Composer!
-if [ $(find ~/.docker-magento/magento2-$1.tar.gz -size -1M) ]; then
+if [ ! -f ~/.docker-magento/magento2-$1.tar.gz ]; then
     echo "Archive not found, or not yet available due to new version release."
     echo "Attempting install with Composer..."
     rm -rf src