6
6
Goinstall is an experiment in automatic package installation.
7
7
It installs packages, possibly downloading them from the internet.
8
It maintains a list of public Go packages at http://godashboard.appspot.com/package.
8
It maintains a list of public Go packages at
9
http://godashboard.appspot.com/package.
11
12
goinstall [flags] importpath...
15
16
-a=false install all previously installed packages
16
17
-clean=false clean the package directory before installing
17
18
-dashboard=true tally public packages on godashboard.appspot.com
19
-install=true build and install the package and its dependencies
18
20
-log=true log installed packages to $GOROOT/goinstall.log for use by -a
21
-nuke=false remove the target object and clean before installing
19
22
-u=false update already-downloaded packages
20
23
-v=false verbose operation
39
42
to update, recompile, and reinstall all goinstalled packages.
41
44
The source code for a package with import path foo/bar is expected
42
to be in the directory $GOROOT/src/pkg/foo/bar/. If the import
43
path refers to a code hosting site, goinstall will download the code
44
if necessary. The recognized code hosting sites are:
45
to be in the directory $GOROOT/src/pkg/foo/bar/ or $GOPATH/src/foo/bar/.
46
See "The GOPATH Environment Variable" for more about GOPATH.
48
By default, goinstall prints output only when it encounters an error.
49
The -v flag causes goinstall to print information about packages
50
being considered and installed.
52
Goinstall ignores Makefiles.
57
If a package import path refers to a remote repository, goinstall will
58
download the code if necessary.
60
Goinstall recognizes packages from a few common code hosting sites:
46
62
BitBucket (Mercurial)
70
86
import "launchpad.net/~user/project/branch"
71
87
import "launchpad.net/~user/project/branch/sub/directory"
74
89
If the destination directory (e.g., $GOROOT/src/pkg/bitbucket.org/user/project)
75
90
already exists and contains an appropriate checkout, goinstall will not
76
91
attempt to fetch updates. The -u flag changes this behavior,
82
97
Otherwise it uses the default version selected by the version control
83
98
system, typically HEAD for git, tip for Mercurial.
85
After a successful download and installation of a publicly accessible
86
remote package, goinstall reports the installation to godashboard.appspot.com,
87
which increments a count associated with the package and the time
88
of its most recent installation. This mechanism powers the package list
89
at http://godashboard.appspot.com/package, allowing Go programmers
90
to learn about popular packages that might be worth looking at.
100
After a successful download and installation of one of these import paths,
101
goinstall reports the installation to godashboard.appspot.com, which
102
increments a count associated with the package and the time of its most
103
recent installation. This mechanism powers the package list at
104
http://godashboard.appspot.com/package, allowing Go programmers to learn about
105
popular packages that might be worth looking at.
91
106
The -dashboard=false flag disables this reporting.
93
By default, goinstall prints output only when it encounters an error.
94
The -v flag causes goinstall to print information about packages
95
being considered and installed.
97
Goinstall does not attempt to be a replacement for make.
98
Instead, it invokes "make install" after locating the package sources.
99
For local packages without a Makefile and all remote packages,
100
goinstall creates and uses a temporary Makefile constructed from
101
the import path and the list of Go files in the package.
108
For code hosted on other servers, goinstall recognizes the general form
112
as denoting the given repository, with or without the .vcs suffix, using
113
the named version control system, and then the path inside that repository.
114
The supported version control systems are:
123
import "example.org/user/foo.hg"
125
denotes the root directory of the Mercurial repository at example.org/user/foo
128
import "example.org/repo.git/foo/bar"
130
denotes the foo/bar directory of the Git repository at example.com/repo or
133
When a version control system supports multiple protocols, goinstall tries each
135
For example, for Git it tries git://, then https://, then http://.
104
138
The GOPATH Environment Variable