This commit is contained in:
2025-05-15 00:46:57 +02:00
parent 30c71cb449
commit b2b27b2c3d
18 changed files with 622 additions and 234 deletions

View File

@@ -2,7 +2,6 @@ package sync
import (
"cloudsave/pkg/remote"
"cloudsave/pkg/sync/ssh"
"context"
"flag"
"fmt"
@@ -28,15 +27,15 @@ func (p *SyncCmd) SetFlags(f *flag.FlagSet) {
}
func (p *SyncCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus {
remotes, err := remote.All()
_, err := remote.All()
if err != nil {
fmt.Fprintln(os.Stderr, "error: failed to load datastore:", err)
return subcommands.ExitFailure
}
for _, remote := range remotes {
ssh.SFTPSyncer{}.Sync(remote)
}
/*for _, remote := range remotes {
}*/
return subcommands.ExitSuccess
}