]> ruderich.org/simon Gitweb - safcm/safcm.git/blob - remote/sync/packages.go
Use SPDX license identifiers
[safcm/safcm.git] / remote / sync / packages.go
1 // MsgSyncReq: install packages on the remote host
2
3 // SPDX-License-Identifier: GPL-3.0-or-later
4 // Copyright (C) 2021-2024  Simon Ruderich
5
6 package sync
7
8 import (
9         "fmt"
10         "os"
11 )
12
13 func (s *Sync) syncPackages() error {
14         if len(s.req.Packages) == 0 {
15                 return nil
16         }
17
18         _, err := os.Stat("/etc/debian_version")
19         if err == nil {
20                 return s.syncPackagesDebian()
21         }
22         // TODO: support more distributions
23         return fmt.Errorf("not yet supported on this distribution")
24 }