Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-02-27 09:06:03 +0300
committerisaacs <i@izs.me>2010-02-27 09:06:03 +0300
commit81d62537e92571a2c6f9a60282a65ed7691d71de (patch)
tree487fa2b170c31f2a5a2300f8f2ecdb50d27db13a /scripts
parent494e7ed63b20a088ed895e0474bbe977d7b13f2b (diff)
Start moving towards using the commonjs packages/1.0-style "scripts" hash rather than a "make" command.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.js12
-rw-r--r--scripts/install.js2
-rw-r--r--scripts/uninstall.js2
3 files changed, 16 insertions, 0 deletions
diff --git a/scripts/bootstrap.js b/scripts/bootstrap.js
new file mode 100644
index 000000000..7a6fa336c
--- /dev/null
+++ b/scripts/bootstrap.js
@@ -0,0 +1,12 @@
+#!/usr/bin/env node
+
+var sys = require("sys");
+
+function print (m, cr) { process.stdio.writeError(m+(cr===false?"":"\n")); return print };
+
+require("../npm").install("http://github.com/isaacs/npm/tarball/master", function (er, ok) {
+ if (er) {
+ sys.error("\nFailed after "+ok.length+" step(s)\n");
+ throw er;
+ } else print("It worked!");
+})
diff --git a/scripts/install.js b/scripts/install.js
new file mode 100644
index 000000000..11034ff40
--- /dev/null
+++ b/scripts/install.js
@@ -0,0 +1,2 @@
+#!/usr/local/bin/node
+require("sys").exec("cp cli.js /usr/local/bin/npm");
diff --git a/scripts/uninstall.js b/scripts/uninstall.js
new file mode 100644
index 000000000..948f4b175
--- /dev/null
+++ b/scripts/uninstall.js
@@ -0,0 +1,2 @@
+#!/usr/local/bin/node
+require("fs").unlink("/usr/local/bin/npm/cli.js");