From 6a2a3c365fc546e5bea23a2aec6779028916a27c Mon Sep 17 00:00:00 2001 From: Phillip Kroll Date: Thu, 22 Nov 2012 18:38:39 +0100 Subject: [PATCH] Update scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/UnzipHttpResponseIntoDirectory.java The CURL option "-L" should be used here in order to allow CURL to follow HTTP redirects. Without this option, this statement will not allow to download an archive from e.g. sourceforge.org. The class "SaveHttpResponseTo" uses the "-L" option as well. --- .../scriptbuilder/domain/UnzipHttpResponseIntoDirectory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/UnzipHttpResponseIntoDirectory.java b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/UnzipHttpResponseIntoDirectory.java index fd31299b75..176c290f71 100644 --- a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/UnzipHttpResponseIntoDirectory.java +++ b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/UnzipHttpResponseIntoDirectory.java @@ -47,7 +47,7 @@ public class UnzipHttpResponseIntoDirectory extends InterpretableStatement { public UnzipHttpResponseIntoDirectory(String method, URI endpoint, Multimap headers, String dir) { super( format( - "({md} %s &&{cd} %s &&curl -X %s -s --retry 20 %s %s >extract.zip && unzip -o -qq extract.zip&& rm extract.zip)\n", + "({md} %s &&{cd} %s &&curl -X -L %s -s --retry 20 %s %s >extract.zip && unzip -o -qq extract.zip&& rm extract.zip)\n", dir, dir, method, Joiner.on(' ').join( transform(headers.entries(), new Function, String>() {