remove directory when downloading the same tutorial

This commit is contained in:
actraiser 2013-04-16 11:38:20 +02:00
parent 417f2ae085
commit 68655ef5c0
4 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ var dust = require('../bin/dust');
***************************************/
dust.cmd
.version('0.4.3')
.version('0.4.4')
.usage('<command> [arguments]');
/*

View File

@ -3,7 +3,7 @@ var dust = require('../bin/dust');
var operatingSystem = operatingSystem();
var osVersion = dust.shell.exec("sw_vers -productVersion", {silent:dust.silent}).output;
var dustVersion = '0.4.3 (2013-04-16)';
var dustVersion = '0.4.4 (2013-04-16)';
exports.operatingSystem = operatingSystem
exports.osVersion = osVersion;

View File

@ -7,9 +7,9 @@ dust.templates.list = function(target){
};
dust.templates.create = function downloadTemplate(repo,target){
if (dust.shell.test('-d',repo)){
if (dust.shell.test('-d',target)){
console.log("Deleting previous download")
dust.shell.exec('rm -rf ' + repo);
dust.shell.exec('rm -rf ' + target);
}
dust.shell.exec("git clone https://github.com/actraiser/" + repo + '.git ' + target);
dust.shell.exec("rm -rf " + repo + '/.git');

View File

@ -1,7 +1,7 @@
{
"name": "dustlayer",
"preferGlobal": true,
"version": "0.4.3",
"version": "0.4.4",
"homepage": "http://dustlayer.com",
"author": "actraiser <actraiser@dustlayer.com>",
"description": "command line suite for new and experienced retro programmers. Check homepage for details.",