mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
Updated gpkg main
This commit is contained in:
+15
-1
@@ -1,12 +1,26 @@
|
||||
package main
|
||||
|
||||
import "os"
|
||||
import "github.com/moovweb/gvm/gpkg/pkgs"
|
||||
|
||||
func showUsage() {
|
||||
println("usage: gpkg list")
|
||||
}
|
||||
|
||||
func main() {
|
||||
gvm_root := os.Getenv("GVM_ROOT")
|
||||
if gvm_root == "" {
|
||||
println("ERROR: gpkg requires gvm to run (http://github.com/moovweb/gvm)")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if len(os.Args) > 1 {
|
||||
if os.Args[1] == "list" {
|
||||
pkgs.List(gvm_root)
|
||||
} else {
|
||||
showUsage()
|
||||
}
|
||||
} else {
|
||||
println("GVM Package Manager!")
|
||||
showUsage()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user