commit 4aab70f
chld
·
2026-02-06 23:04:08 +0000 UTC
parent bb34742
push qucik!
1 files changed,
+17,
-4
M
main.go
M
main.go
+17,
-4
1@@ -13,18 +13,23 @@ import (
2 func help() {
3 // ports management
4 fmt.Printf("\033[m\033[1;31m%s\t\033[m\033[32m", filepath.Base(os.Args[0]))
5- fmt.Printf("[s]\n")
6+ fmt.Printf("[s]")
7+ fmt.Printf("\033[m\t\tupdate and upgrade\n")
8 // package mamagement
9 fmt.Printf("\033[m\033[1;32m%s\t\033[m\033[32m", filepath.Base(os.Args[0]))
10- fmt.Printf("[m|mi|mic]\n")
11+ fmt.Printf("[m|mi|mic]")
12+ fmt.Printf("\033[m\t\tmanage ports\n")
13
14 // package management without compiling
15 fmt.Printf("\033[m\033[1;33m%s\t\033[m\033[32m", filepath.Base(os.Args[0]))
16- fmt.Printf("[sp]\n")
17+ fmt.Printf("[sp]")
18+ fmt.Printf("\033[m\t\tmanage ports tree\n")
19
20 // misc
21 fmt.Printf("\033[m\033[1m%s\t\033[m\033[32m", filepath.Base(os.Args[0]))
22 fmt.Printf("[h]")
23+ fmt.Printf("\033[m\t\tabout %s",
24+ filepath.Base(os.Args[0]))
25
26 fmt.Println()
27 }
28@@ -59,6 +64,10 @@ func main() {
29 }
30 dgrb.Build(pkgs[0], "clean")
31 case "m":
32+ if len(pkgs) < 1 {
33+ help()
34+ os.Exit(1)
35+ }
36 dgre.VC("DTR_DIR")
37 dgrb.Build(pkgs[0], "build")
38 /*
39@@ -70,8 +79,12 @@ func main() {
40 // TODO: install and clean
41 */
42 case "sp":
43+ if len(pkgs) < 1 {
44+ help()
45+ os.Exit(1)
46+ }
47 dgre.VC("DTR_DIR")
48- fmt.Println(dgr.FindPkg(os.Args[2]))
49+ fmt.Println(dgr.FindPkg(pkgs[0]))
50 case "h", "help":
51 help()
52 default: