mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-28 04:46:41 -04:00
Make server respond to "fetch" with output formatted for the client's OS family
This commit is contained in:
+3
-1
@@ -6,6 +6,7 @@ import (
|
|||||||
"github.com/rwinkhart/MUTN/src/cli"
|
"github.com/rwinkhart/MUTN/src/cli"
|
||||||
"github.com/rwinkhart/MUTN/src/sync"
|
"github.com/rwinkhart/MUTN/src/sync"
|
||||||
"os"
|
"os"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,7 +19,8 @@ func main() {
|
|||||||
switch args[1] {
|
switch args[1] {
|
||||||
case "fetch":
|
case "fetch":
|
||||||
// print all information needed for syncing to stdout for interpretation by the client
|
// print all information needed for syncing to stdout for interpretation by the client
|
||||||
sync.GetRemoteDataFromServer(args[2])
|
clientIsWindows, _ := strconv.ParseBool(args[3])
|
||||||
|
sync.GetRemoteDataFromServer(args[2], clientIsWindows)
|
||||||
case "shear":
|
case "shear":
|
||||||
// shear an entry from the server and add it to the deletions directory
|
// shear an entry from the server and add it to the deletions directory
|
||||||
deviceIDTargetLocation := strings.Split(args[2], "\x1d")
|
deviceIDTargetLocation := strings.Split(args[2], "\x1d")
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ func EntryReader(decryptedEntry []string, hidePassword bool, sync bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if sync && !backend.Windows {
|
if sync && !backend.IsWindows {
|
||||||
SshypSync() // TODO Remove after native sync is implemented
|
SshypSync() // TODO Remove after native sync is implemented
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user