mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-02 07:07:24 -04:00
Server stdin migration: fetch
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ 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])
|
sync.GetRemoteDataFromServer(stdin[0])
|
||||||
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")
|
||||||
|
|||||||
+1
-1
@@ -141,7 +141,7 @@ func getRemoteDataFromClient(manualSync bool) (map[string]int64, []string, []str
|
|||||||
os.Exit(0) // exit silently if the sync job was called automatically, as the user may just be in offline mode
|
os.Exit(0) // exit silently if the sync job was called automatically, as the user may just be in offline mode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
output := GetSSHOutput("libmuttonserver fetch "+clientDeviceID[0].Name(), "", manualSync)
|
output := GetSSHOutput("libmuttonserver fetch", clientDeviceID[0].Name(), manualSync)
|
||||||
|
|
||||||
// split output into slice based on occurrences of "\x1d"
|
// split output into slice based on occurrences of "\x1d"
|
||||||
outputSlice := strings.Split(output, "\x1d")
|
outputSlice := strings.Split(output, "\x1d")
|
||||||
|
|||||||
Reference in New Issue
Block a user