Skip to content

Commit

Permalink
Merge pull request #43 from jasonkarns/scraper-cwd
Browse files Browse the repository at this point in the history
make scraper safe to run from root or tools/
  • Loading branch information
OiNutter committed May 12, 2015
2 parents 1c371ec + a7e2c97 commit db8d851
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tools/iojs_scraper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
var http = require('https'),
fs = require('fs'),
fs = require('fs'),
path = require('path'),
baseUrl = "https://github.com/iojs/io.js.git";

function generateNodeFile (item) {
var version = "iojs-" + item.version.replace(/^v/,''),
installLine = 'install_git "' + version + '" "' + baseUrl + '" "' + item.version + '" standard',
filePath = '../share/node-build/' + version;
filePath = path.join(__dirname, '../share/node-build', version);

fs.exists(filePath,function(exists){
if(!exists){
Expand Down
5 changes: 3 additions & 2 deletions tools/node_scraper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var http = require('http'),
fs = require('fs'),
fs = require('fs'),
path = require('path'),
baseUrl = "http://nodejs.org/dist/",
generateNodeFile = function( version ){
var shaUrl = baseUrl + version + "/" + "SHASUMS.txt",
Expand All @@ -26,7 +27,7 @@ var http = require('http'),
//this is gnarly, oh well
//install_package "node-v0.10.0" "http://nodejs.org/dist/v0.10.0/node-v0.10.0.tar.gz#7321266347dc1c47ed2186e7d61752795ce8a0ef"
installLine = 'install_package "node-' + version + '" "' + baseUrl + version + '/' + parts[1] + '#'+parts[0]+'"'
filePath = '../share/node-build/' + version.substring(1)
filePath = path.join(__dirname, '../share/node-build', version.substring(1))
fs.exists(filePath,function(exists){

if(!exists){
Expand Down

0 comments on commit db8d851

Please sign in to comment.