From fe11d1788d6d05705df1429ab70d799f0467ef06 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 8 Sep 2014 10:18:41 -0400 Subject: [PATCH] feature(update) rm main --- lib/server/update.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/server/update.js b/lib/server/update.js index 03481a76..2148af83 100644 --- a/lib/server/update.js +++ b/lib/server/update.js @@ -3,21 +3,14 @@ (function() { 'use strict'; - if (!global.cloudcmd) - return console.log( - '# update.js' + '\n' + - '# -----------' + '\n' + - '# Module is part of Cloud Commander,' + '\n' + - '# used for work update thru git.' + '\n' + - '# If you wont to see at work install git' + '\n' + - '# http://cloudcmd.io' + '\n'); - - var main = global.cloudcmd.main, - mainpackage = main.mainpackage || {}, - exec = require('child_process').exec, + var exec = require('child_process').exec, fs = require('fs'), + path = require('path'), Util = require('../util'), - DIR = main.DIR; + + DIR = path.normalize(__dirname + '/../../'), + + mainpackage = require(DIR + 'package'); exports.get = function() { fs.readdir(DIR, function(error, files) {