additional functions and testing
This commit is contained in:
parent
f0cb4f4b3f
commit
6853f1639e
3 changed files with 58 additions and 5 deletions
|
|
@ -3,10 +3,23 @@
|
|||
|
||||
package software
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/amidaware/rmmagent/agent/system"
|
||||
)
|
||||
|
||||
func GetInstalledSoftware() ([]Software, error) {
|
||||
return []Software{}, nil
|
||||
}
|
||||
opts := system.NewCMDOpts()
|
||||
opts.Command = "find /usr/share/applications -maxdepth 1 -type f -exec basename {} .desktop \\; | sort"
|
||||
result := system.CmdV2(opts)
|
||||
softwares := strings.Split(result.Stdout, "\n")
|
||||
software := []Software{}
|
||||
for _, s := range softwares {
|
||||
software = append(software, Software {
|
||||
Name: s,
|
||||
})
|
||||
}
|
||||
|
||||
func InstallChoco() {}
|
||||
|
||||
func InstallWithChoco(name string) (string, error) { return "", nil }
|
||||
return software, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue