Skip to content

Commit

Permalink
npmjx naming cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ktrzeciaknubisa committed Mar 31, 2015
1 parent c89a98a commit 87791c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,8 @@
req.end();
};
var name = "";
var npm_str = "https://s3.amazonaws.com/nodejx/npmjxv5.jx";
var npm_basename = "npmjxv6.jx";
var npm_str = "https://s3.amazonaws.com/nodejx/" + npm_basename;
var isWindows = process.platform === 'win32';
var homeFolder = process.__npmjxpath || process.env.HOME
|| process.env.HOMEPATH || process.env.USERPROFILE;
Expand Down Expand Up @@ -2262,7 +2263,7 @@
fs.writeFileSync(jxFolder + pathModule.sep + process.jxversion, "1");
}

targetBin = jxFolder + pathModule.sep + "npmjxv5.jx";
targetBin = jxFolder + pathModule.sep + npm_basename;
download(npm_str, targetBin, function () {
GoEn();
});
Expand Down
11 changes: 3 additions & 8 deletions tools/npmjx/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ var http = require('https')
, path = require('path')
, fs = require("fs");

if (process.argv[1].toLowerCase().lastIndexOf('npmjxv3.jx') != process.argv[1].length - 10) {
console.error("usage: jx install [package_name]");
console.error(">>", process.argv.join(" "));
process.exit(1);
}

var getOptions = function (name) {
for (var o = 0; o < process.argv.length; o++) {
if (process.argv[o] == name) {
Expand Down Expand Up @@ -139,9 +133,10 @@ var extract = function (loc, target, cb, targz) {
else {
var clear = false;
try {
if (fs.existsSync(__dirname + path.sep + "npmjxv3.jx")) {
var fname = path.join(__dirname, path.basename(process.argv[1]));
if (fs.existsSync(fname)) {
clear = true;
fs.unlink(__dirname + path.sep + "npmjxv3.jx");
fs.unlink(fname);
}
} catch (e) {
}
Expand Down
2 changes: 1 addition & 1 deletion tools/npmjx/npmjx.jxp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"startup": "index.js",
"execute": "index.js",
"extract": false,
"output": "npmjxv5.jx",
"output": "npmjxv6.jx",
"files": [
"index.js",
"node_modules/tar.gz/example/example.js",
Expand Down

0 comments on commit 87791c0

Please sign in to comment.