Browse Source

change name to gopm

pull/103/head
Unknown 12 years ago
parent
commit
71b124471e
  1. 2
      build.go
  2. 4
      check.go
  3. 2
      doc/bitbucket.go
  4. 2
      doc/github.go
  5. 2
      doc/google.go
  6. 2
      doc/launchpad.go
  7. 2
      doc/walker.go
  8. 2
      docs/Quick_Start.md
  9. 16
      gopm.go
  10. 8
      i18n/en-US/usage.tpl
  11. 2
      i18n/en-US/usage_build.txt
  12. 6
      i18n/en-US/usage_install.txt
  13. 6
      i18n/en-US/usage_remove.txt
  14. 8
      i18n/zh-CN/usage.tpl
  15. 2
      i18n/zh-CN/usage_build.txt
  16. 6
      i18n/zh-CN/usage_install.txt
  17. 6
      i18n/zh-CN/usage_remove.txt
  18. 4
      install.go
  19. 4
      remove.go
  20. 2
      search.go

2
build.go

@ -8,7 +8,7 @@ import (
"fmt"
"os"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/utils"
)
var cmdBuild = &Command{

4
check.go

@ -9,8 +9,8 @@ import (
"os"
"strings"
"github.com/GPMGo/gpm/doc"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/doc"
"github.com/GPMGo/gopm/utils"
)
var cmdCheck = &Command{

2
doc/bitbucket.go

@ -16,7 +16,7 @@ import (
"regexp"
"strings"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/utils"
)
var (

2
doc/github.go

@ -15,7 +15,7 @@ import (
"regexp"
"strings"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/utils"
)
var (

2
doc/google.go

@ -12,7 +12,7 @@ import (
"regexp"
"strings"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/utils"
)
var (

2
doc/launchpad.go

@ -15,7 +15,7 @@ import (
"regexp"
"strings"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/utils"
)
var LaunchpadPattern = regexp.MustCompile(`^launchpad\.net/(?P<repo>(?P<project>[a-z0-9A-Z_.\-]+)(?P<series>/[a-z0-9A-Z_.\-]+)?|~[a-z0-9A-Z_.\-]+/(\+junk|[a-z0-9A-Z_.\-]+)/[a-z0-9A-Z_.\-]+)(?P<dir>/[a-z0-9A-Z_.\-/]+)*$`)

2
doc/walker.go

@ -20,7 +20,7 @@ import (
"runtime"
"strings"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/utils"
)
type sliceWriter struct{ p *[]byte }

2
docs/Quick_Start.md

@ -42,7 +42,7 @@ You can install gpm either from source or download binary.
- Run test: switch work directory to gopm project, and execute command `go test` to build and test commands automatically(for now, tested commands are `gopm install`, `gopm remove`).
- Add gopm project path to your environment variable `PATH` in order to execute it in other directories.
**Attention** You can actually put binary in any path that has already existed in $PATH, so you don't need to add a new path to $PATH again.
**Attention** If you install from source, you can actually put binary in any path that has already existed in $PATH, so you don't need to add a new path to $PATH again.
### Download binary

16
gopm.go

@ -22,8 +22,8 @@ import (
"unicode/utf8"
"github.com/BurntSushi/toml"
"github.com/GPMGo/gpm/doc"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/doc"
"github.com/GPMGo/gopm/utils"
)
var (
@ -117,8 +117,8 @@ func getAppPath() bool {
if !utils.IsExist(appPath + "conf/") {
paths := utils.GetGOPATH()
for _, p := range paths {
if utils.IsExist(p + "/src/github.com/GPMGo/gpm/") {
appPath = p + "/src/github.com/GPMGo/gpm/"
if utils.IsExist(p + "/src/github.com/GPMGo/gopm/") {
appPath = p + "/src/github.com/GPMGo/gopm/"
break
}
}
@ -288,7 +288,7 @@ func initialize() bool {
}
// Load configuration.
if _, err := toml.DecodeFile(appPath+"conf/gpm.toml", &config); err != nil {
if _, err := toml.DecodeFile(appPath+"conf/gopm.toml", &config); err != nil {
fmt.Printf("initialize -> Fail to load configuration[ %s ]\n", err)
return false
}
@ -361,7 +361,7 @@ func setExitStatus(n int) {
}
var usageTemplate string
var helpTemplate = `{{if .Runnable}}usage: gpm {{.UsageLine}}
var helpTemplate = `{{if .Runnable}}usage: gopm {{.UsageLine}}
{{end}}{{.Long | trim}}
`
@ -401,7 +401,7 @@ func help(args []string) {
return
}
if len(args) != 1 {
fmt.Fprintf(os.Stderr, "usage: gpm help command\n\nToo many arguments given.\n")
fmt.Fprintf(os.Stderr, "usage: gopm help command\n\nToo many arguments given.\n")
os.Exit(2) // failed at 'gpm help'
}
@ -415,7 +415,7 @@ func help(args []string) {
}
}
fmt.Fprintf(os.Stderr, "Unknown help topic %#q. Run 'gpm help'.\n", arg)
fmt.Fprintf(os.Stderr, "Unknown help topic %#q. Run 'gopm help'.\n", arg)
os.Exit(2) // failed at 'go help cmd'
}

8
i18n/en-US/usage.tpl

@ -1,18 +1,18 @@
gpm(Go Package Manager) is a Go package manage tool for search, install, update, share packages.
gopm(Go Package Manager) is a Go package manage tool for search, install, update, share packages.
Usage:
gpm command [arguments]
gopm command [arguments]
The commands are:
{{range .}}{{if .Runnable}}
{{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
Use "gpm help [command]" for more information about a command.
Use "gopm help [command]" for more information about a command.
Additional help topics:
{{range .}}{{if not .Runnable}}
{{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
Use "gpm help [topic]" for more information about that topic.
Use "gopm help [topic]" for more information about that topic.

2
i18n/en-US/usage_build.txt

@ -16,4 +16,4 @@ The list flags accept a space-separated list of strings.
For more about specifying packages, see 'go help packages'.
See also: gpm install.
See also: gopm install.

6
i18n/en-US/usage_install.txt

@ -21,7 +21,7 @@ The install flags are:
The list flags accept a space-separated list of strings.
For more about specifying packages, see 'go help packages'.
For more about bundle, see 'gpm help bundle'.
For more about snapshot, see 'gpm help snapshot'.
For more about bundle, see 'gopm help bundle'.
For more about snapshot, see 'gopm help snapshot'.
See also: gpm remove.
See also: gopm remove.

6
i18n/en-US/usage_remove.txt

@ -8,7 +8,7 @@ The remove flags are:
The list flags accept a space-separated list of strings.
For more about specifying packages, see 'go help packages'.
For more about bundle, see 'gpm help bundle'.
For more about snapshot, see 'gpm help snapshot'.
For more about bundle, see 'gopm help bundle'.
For more about snapshot, see 'gopm help snapshot'.
See also: gpm install.
See also: gopm install.

8
i18n/zh-CN/usage.tpl

@ -1,18 +1,18 @@
gpm(Go 包管理工具) 是一款涵盖搜索、安装、更新、分享功能 Go 包的管理工具。
gopm(Go 包管理工具) 是一款涵盖搜索、安装、更新、分享功能 Go 包的管理工具。
用法:
gpm 命令 [参数]
gopm 命令 [参数]
命令列表:
{{range .}}{{if .Runnable}}
{{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
使用 "gpm help [命令]" 来获取相关命令的更多信息.
使用 "gopm help [命令]" 来获取相关命令的更多信息.
其它帮助主题:
{{range .}}{{if not .Runnable}}
{{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
使用 "gpm help [主题]" 来获取相关主题的更多信息.
使用 "gopm help [主题]" 来获取相关主题的更多信息.

2
i18n/zh-CN/usage_build.txt

@ -15,5 +15,5 @@ Build 命令编译并安装 Go 包以及其依赖包.
获取更多有关包的信息,参见 'go help packages'.
相关主题: gpm install.
相关主题: gopm install.

6
i18n/zh-CN/usage_install.txt

@ -19,7 +19,7 @@ Install 命令下载并安装 Go 包及其依赖包.
多个参数通过空格来间隔.
获取更多有关包的信息,参见 'go help packages'.
获取更多有关集合的信息,参见 'gpm help bundle'.
获取更多有关快照的信息,参见 'gpm help snapshot'.
获取更多有关集合的信息,参见 'gopm help bundle'.
获取更多有关快照的信息,参见 'gopm help snapshot'.
相关主题: gpm build.
相关主题: gopm build.

6
i18n/zh-CN/usage_remove.txt

@ -8,7 +8,7 @@ Remove 命令删除 Go 包及其依赖包.
获取更多有关包的信息,参见 'go help packages'.
获取更多有关集合的信息,参见 'gpm help bundle'.
获取更多有关快照的信息,参见 'gpm help snapshot'.
获取更多有关集合的信息,参见 'gopm help bundle'.
获取更多有关快照的信息,参见 'gopm help snapshot'.
相关主题: gpm install.
相关主题: gopm install.

4
install.go

@ -14,8 +14,8 @@ import (
"regexp"
"strings"
"github.com/GPMGo/gpm/doc"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/doc"
"github.com/GPMGo/gopm/utils"
)
var (

4
remove.go

@ -11,8 +11,8 @@ import (
"runtime"
"strings"
"github.com/GPMGo/gpm/doc"
"github.com/GPMGo/gpm/utils"
"github.com/GPMGo/gopm/doc"
"github.com/GPMGo/gopm/utils"
)
var (

2
search.go

@ -8,7 +8,7 @@ import (
"fmt"
"strings"
"github.com/GPMGo/gpm/doc"
"github.com/GPMGo/gopm/doc"
)
var cmdSearch = &Command{

Loading…
Cancel
Save