mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-30 08:13:01 +00:00
Show local apps as available
This commit is contained in:
parent
6ebc562599
commit
cc92ec3e23
10
appvm.go
10
appvm.go
@ -102,12 +102,20 @@ func list(l *libvirt.Libvirt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("\nAvailable VM:")
|
fmt.Println("\nAvailable VM:")
|
||||||
files, err := ioutil.ReadDir(os.Getenv("GOPATH") + "/src/code.dumpstack.io/tools/appvm/nix")
|
files, err := ioutil.ReadDir(configDir + "/nix")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
|
switch f.Name() {
|
||||||
|
case "base.nix":
|
||||||
|
continue
|
||||||
|
case "local.nix":
|
||||||
|
continue
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("\t", f.Name()[0:len(f.Name())-4])
|
fmt.Println("\t", f.Name()[0:len(f.Name())-4])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user