mirror of
https://github.com/kemko/xc.git
synced 2026-01-01 15:55:43 +03:00
force scp distribute type for runscript
This commit is contained in:
@@ -416,6 +416,12 @@ func (c *Cli) dorunscript(mode execMode, argsLine string) {
|
||||
remoteFilename = fmt.Sprintf("tmp.xc.%s_%s", now, filepath.Base(localFilename))
|
||||
remoteFilename = filepath.Join(c.remoteTmpDir, remoteFilename)
|
||||
|
||||
if c.distributeType != remote.CTScp {
|
||||
currentDistributeType := c.distributeType
|
||||
remote.SetDistributeType(remote.CTScp)
|
||||
defer remote.SetDistributeType(currentDistributeType)
|
||||
}
|
||||
|
||||
dr := remote.Distribute(hosts, localFilename, remoteFilename, false)
|
||||
copyError := dr.ErrorHosts
|
||||
hosts = dr.SuccessHosts
|
||||
@@ -500,7 +506,7 @@ func (c *Cli) runRC(rcfile string) {
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
term.Successf("Running rcfile %s...", rcfile)
|
||||
term.Successf("Running rcfile %s...\n", rcfile)
|
||||
sc := bufio.NewScanner(f)
|
||||
for sc.Scan() {
|
||||
cmd := sc.Text()
|
||||
|
||||
@@ -383,7 +383,7 @@ func generalHelp() {
|
||||
List of commands:
|
||||
alias creates a local alias command
|
||||
cd changes current working directory
|
||||
collapse shortcut for "mode collapse"
|
||||
collapse shortcut for "mode collapse"
|
||||
debug one shouldn't use this
|
||||
delay sets a delay between hosts in serial mode
|
||||
distribute copies a file to a number of hosts in parallel
|
||||
|
||||
Reference in New Issue
Block a user