mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-05 11:53:01 +00:00
Implements update repos wrapper
This commit is contained in:
parent
6c72b5de00
commit
af5691b0d4
@ -55,6 +55,10 @@ You need to **relogin** if you install virt-manager (libvirt) first time.
|
||||
$ appvm start chromium
|
||||
$ # ... long wait for first time, because we need to collect a lot of packages
|
||||
|
||||
## Synchronize remote repos for applications
|
||||
|
||||
$ appvm sync
|
||||
|
||||
You can customize local settings in **~/.config/appvm/nix/local.nix**.
|
||||
|
||||
Default hotkey to release cursor: ctrl+alt.
|
||||
|
18
appvm.go
18
appvm.go
@ -327,6 +327,20 @@ func search(name string) {
|
||||
return
|
||||
}
|
||||
|
||||
func sync() {
|
||||
err := exec.Command("nix-channel", "--update").Run()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
err = exec.Command("nix", "search", "-u").Run()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
log.Println("Done")
|
||||
}
|
||||
|
||||
var configDir = os.Getenv("HOME") + "/.config/appvm/"
|
||||
|
||||
func main() {
|
||||
@ -375,6 +389,8 @@ func main() {
|
||||
searchCommand := kingpin.Command("search", "Search for application")
|
||||
searchName := searchCommand.Arg("name", "Application name").Required().String()
|
||||
|
||||
kingpin.Command("sync", "Synchronize remote repos for applications")
|
||||
|
||||
switch kingpin.Parse() {
|
||||
case "list":
|
||||
list(l)
|
||||
@ -390,5 +406,7 @@ func main() {
|
||||
drop(*dropName)
|
||||
case "autoballoon":
|
||||
autoBalloon(l, *minMemory*1024, *adjustPercent)
|
||||
case "sync":
|
||||
sync()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user