choice between distribute types

This commit is contained in:
Pavel Vorobyov
2019-09-25 12:53:08 +03:00
parent 1328d7d68c
commit e659ccb06f
6 changed files with 48 additions and 1 deletions

View File

@@ -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,
}

View File

@@ -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