mirror of
https://github.com/kemko/xc.git
synced 2026-01-01 15:55:43 +03:00
choice between distribute types
This commit is contained in:
@@ -41,7 +41,7 @@ func Distribute(hosts []string, localFilename string, remoteFilename string, rec
|
||||
LocalFilename: localFilename,
|
||||
RemoteFilename: remoteFilename,
|
||||
RecursiveCopy: recursive,
|
||||
Copy: CTTar,
|
||||
Copy: currentDistributeType,
|
||||
Cmd: "",
|
||||
WG: &wg,
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ var (
|
||||
currentUser string
|
||||
currentPassword string
|
||||
currentRaise RaiseType
|
||||
currentDistributeType CopyType
|
||||
currentUsePasswordManager bool
|
||||
currentProgressBar bool
|
||||
currentPrependHostnames bool
|
||||
@@ -59,6 +60,11 @@ func SetRaise(raise RaiseType) {
|
||||
currentRaise = raise
|
||||
}
|
||||
|
||||
// SetDistributeType sets executer distribute type
|
||||
func SetDistributeType(dtr CopyType) {
|
||||
currentDistributeType = dtr
|
||||
}
|
||||
|
||||
// SetPassword sets executer password
|
||||
func SetPassword(password string) {
|
||||
currentPassword = password
|
||||
|
||||
Reference in New Issue
Block a user