Browse files

fix a bug in installer regarding actual bin path + increase release n…

…umber
  • Loading branch information...
1 parent cf1fe2b commit 853765e0a7a96a67c3b6283ebac3edc7d123f5d7 @pdeschen committed Jun 20, 2011
Showing with 22 additions and 12 deletions.
  1. +1 −1 .gitignore
  2. +1 −1 lib/index.js
  3. +13 −2 lib/installer.js
  4. +5 −4 package.json
  5. +2 −4 readme.textile
View
2 .gitignore
@@ -1 +1 @@
-/npm-debug.log
+npm-debug.log
View
2 lib/index.js
@@ -31,7 +31,7 @@ exports.parse = function () {
console.log(color('\tdone', "green"));
});
} else {
-
+ process.title = "nodast";
cli.main(function (args, options) {
$proxy.start();
});
View
15 lib/installer.js
@@ -20,7 +20,14 @@ var install = function (callback) {
if (!exists) {
fs.mkdirSync(etc, 755);
}
- var inStream = fs.createReadStream('./etc/nodast.js');
+ var bindir = path.dirname(fs.realpathSync(process.argv[1]));
+ var configIn = './etc/nodast.js';
+ console.log(process.argv);
+ if (process.argv) {
+ //configIn = bindir + "/../" +configIn;
+ configIn = path.join(bindir, "..", configIn);
+ }
+ var inStream = fs.createReadStream(configIn);
var outStream = fs.createWriteStream(etc + 'nodast.js', {
flags : 'w',
encoding : null,
@@ -29,7 +36,11 @@ var install = function (callback) {
util.pump(inStream, outStream, function (error) {
handleError(error);
- var initdInStream = fs.createReadStream('./scripts/nodast.initd');
+ var initdIn = './scripts/nodast.initd';
+ if (process.argv) {
+ initdIn = path.join(bindir, "..", initdIn);
+ }
+ var initdInStream = fs.createReadStream(initdIn);
var initdOutStream = fs.createWriteStream(initd + 'nodast', {
flags : 'w',
encoding : null,
View
9 package.json
@@ -2,7 +2,7 @@
"author": "Pascal Deschenes <pdeschen@rassemblr.com> (http://blog.rassemblr.com/)",
"name": "nodast",
"description": "Asterisk FastAgi Proxy",
- "version": "0.0.1",
+ "version": "0.0.2",
"homepage": "http://github.com/pdeschen/nodast",
"preferGlobal": true,
"keywords": ["telephony", "asterisk", "proxy", "fastagi"],
@@ -12,9 +12,10 @@
},
"main": "nodast",
"directories": {
- "lib": "./lib",
- "bin": "./bin",
- "etc": "./etc"
+ "lib": "./lib/",
+ "bin": "./bin/",
+ "etc": "./etc/",
+ "scripts" : "./scripts/"
},
"config": {
"etc": "/etc/nodast/",
View
6 readme.textile
@@ -104,13 +104,11 @@ h2. License
Copyright (c) 2011 Pascal Deschenes
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
h6. Palette

0 comments on commit 853765e

Please sign in to comment.