|
|
|
@ -9,7 +9,8 @@ export const description = "Generates projects using the Bandolier educational f |
|
|
|
|
|
|
|
|
|
export const options = [ |
|
|
|
|
["--repo", "repository to dupe and setup", BANDO_GIT], |
|
|
|
|
["--template", "templates directory to use for setups", "commands/templates"] |
|
|
|
|
["--template", "templates directory to use for setups", "commands/templates"], |
|
|
|
|
["--keep-git", "for patches and analysis, you can keep the original .git", false], |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
export const argument = ["<target>", "name of the project directory (must not exist)"]; |
|
|
|
@ -40,4 +41,11 @@ export const main = async (target, opts) => { |
|
|
|
|
copy(f_normal, copy_to); // we can add a template thing here
|
|
|
|
|
log.debug(`${f_normal} ---> ${copy_to}`); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// remove the .git directory
|
|
|
|
|
if(opts.keepGit) { |
|
|
|
|
log.warn("Keeping the .git directory, so be sure to delete it if you want to do your own work."); |
|
|
|
|
} else { |
|
|
|
|
exec_i(`rm -rf ${path.join(target, ".git")}`); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|