@@ -67,16 +67,6 @@ module.exports = function (grunt) {
67
67
return exec ( "unzip -q \"" + src + "\" -d \"" + dest + "\"" ) ;
68
68
}
69
69
70
- function curl ( src , dest ) {
71
- if ( process . platform === "win32" ) {
72
- var dest = dest . replace ( / \\ / g, "/" ) ;
73
- }
74
-
75
- grunt . verbose . writeln ( "Downloading " + src + " to " + dest ) ;
76
- var cmd = "curl -o \"" + dest + "\" \"" + src + "\"" ;
77
- return exec ( cmd ) ;
78
- }
79
-
80
70
// task: cef
81
71
grunt . registerTask ( "cef" , "Download and setup CEF" , function ( ) {
82
72
var config = "cef-" + platform + common . arch ( ) ,
@@ -137,34 +127,6 @@ module.exports = function (grunt) {
137
127
grunt . task . run ( "curl-dir:" + grunt . config ( "cefConfig" ) ) ;
138
128
} ) ;
139
129
140
- grunt . registerTask ( "curl-download" , function ( ) {
141
- var downloadConfig = arguments [ 0 ] ,
142
- downloadSource = grunt . config ( "curl-dir." + downloadConfig + ".src" ) ,
143
- downloadDest = path . join ( process . cwd ( ) , grunt . config ( "curl-dir." + downloadConfig + ".dest" ) ) ,
144
- downloadSourceURLS = downloadSource ,
145
- done = this . async ( ) ;
146
-
147
- if ( ! Array . isArray ( downloadSource ) ) {
148
- downloadSourceURLS = [ ] ;
149
- downloadSourceURLS . push ( downloadSource ) ;
150
- }
151
-
152
- // ensure the download directory exists
153
- fs . mkdirSync ( downloadDest ) ;
154
-
155
- var promises = downloadSourceURLS . map ( function ( srcUrl ) {
156
- var filename = path . basename ( srcUrl ) ,
157
- dest = path . join ( downloadDest , filename ) ;
158
-
159
- grunt . verbose . writeln ( "Download " + srcUrl + " to " + dest ) ;
160
- return curl ( srcUrl , dest ) ;
161
- } ) ;
162
-
163
- q . all ( promises ) . then ( done ) . catch ( function ( err ) {
164
- done ( err ) ;
165
- } ) ;
166
- } ) ;
167
-
168
130
function cefFileLocation ( ) {
169
131
return path . resolve ( process . cwd ( ) , "deps/cef" ) ;
170
132
}
@@ -290,8 +252,7 @@ module.exports = function (grunt) {
290
252
grunt . log . writeln ( "Downloading " + downloadConfig + ". This may take a while..." ) ;
291
253
// curl doesn't give me the option to handle download errors on my own. If the requested file can't
292
254
// be found, curl will log an error to the console.
293
- //grunt.task.run("curl-dir:" + downloadConfig);
294
- grunt . task . run ( "curl-download:" + downloadConfig ) ;
255
+ grunt . task . run ( "curl-dir:" + downloadConfig ) ;
295
256
} ) ;
296
257
297
258
// task: cef-extract
0 commit comments