Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
some style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fent committed Sep 13, 2013
1 parent 604fa7b commit 08a2ba5
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions scripts/download.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
var fs = require('fs')
, path = require('path')
, existsSync = fs.existsSync || path.existsSync
, http = require('http')
;
var fs = require('fs');
var path = require('path');
var http = require('http');


var dir = path.join(__dirname, '..', 'bin')
, filename = 'youtube-dl'
, filepath = path.join(dir, filename)
;
var dir = path.join(__dirname, '..', 'bin');
var filename = 'youtube-dl';
var filepath = path.join(dir, filename);


// Make bin dir if it doesn't exists.
if (!existsSync(dir)) {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, 484);
}

// Download youtube-dl.
http.get({
host: 'youtube-dl.org'
, path: '/downloads/2013.07.12/youtube-dl'
}, function(res) {
var url = 'http://youtube-dl.org/downloads/2013.07.12/youtube-dl';
http.get(url, function(res) {
if (res.statusCode !== 200) {
throw Error('Response Error: ' + res.statusCode);
}
Expand Down

0 comments on commit 08a2ba5

Please sign in to comment.