Make server respond to "fetch" with output formatted for the client's OS family

This commit is contained in:
2024-05-17 19:36:23 -04:00
parent df33a5b149
commit 9242b6caa0
7 changed files with 41 additions and 17 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ import (
"github.com/rwinkhart/MUTN/src/cli"
"github.com/rwinkhart/MUTN/src/sync"
"os"
"strconv"
"strings"
)
@@ -18,7 +19,8 @@ func main() {
switch args[1] {
case "fetch":
// 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":
// shear an entry from the server and add it to the deletions directory
deviceIDTargetLocation := strings.Split(args[2], "\x1d")