Browse Source

Added -v subcommand like git to operate on all folders

master
chess 3 years ago
parent
commit
4eed7782d4
1 changed files with 36 additions and 2 deletions
  1. 36
    2
      index.js

+ 36
- 2
index.js View File

// git remote equivalents... // git remote equivalents...
// git branch --set-upstream-to=elixir-unc/master master // git branch --set-upstream-to=elixir-unc/master master
// git push --set-upstream elixir-unc branch.. // git push --set-upstream elixir-unc branch..
, 'remote': (args) => {
// Subcommands!
if(!processedArgs.v) return false;

var serial_perform = (repo) => {
var options = { cwd: instanceroot + '/' + repo }
return [
['git', ['remote', '-v'], options]
]
}

var x = (args) => {
var tasq = () => {
// console.log(args)
return nodeShellExec.apply(null, args).catch(e => {
// We continue on failure.
console.error(tasq.toString())
})
}
tasq.toString = function(){
return JSON.stringify(args)
}
return tasq;
}

var perform = (dir) => {
return any(serial_perform(dir.name).map(x))
}

dirs(perform)
}

, 'remote set-url': (args) => { , 'remote set-url': (args) => {
// git remote set-url elixir-unc //10.10.5.60/gitrepo/chess/bbhverse // git remote set-url elixir-unc //10.10.5.60/gitrepo/chess/bbhverse
var __args = { var __args = {
} }
var perform_git_seturl = (dir) => { var perform_git_seturl = (dir) => {
op['is-git-repo'](dir).then((logEntry) => { op['is-git-repo'](dir).then((logEntry) => {
any(serial_perform_git_seturl(dir.name).map(x))
return any(serial_perform_git_seturl(dir.name).map(x))
}).catch((e) => { }).catch((e) => {
// console.log('Failed : ' + dir.name) // console.log('Failed : ' + dir.name)
}) })
// The main elxr cli process // The main elxr cli process
function elxrworker() { function elxrworker() {
var subcommandlabels = { var subcommandlabels = {
remote : `remote ${processedArgs._[1]}`
remote : (`remote ${processedArgs._[1] || ''}`).trim()
} }


var __runcmd = function (label) { var __runcmd = function (label) {

Loading…
Cancel
Save