aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-06-02 05:41:39 +0700
committerShulhan <ms@kilabit.info>2018-06-04 00:07:21 +0700
commitfd2b25bb08063ed7deb09757374a260dba22ee5a (patch)
tree01c3ae4ddbbb67a50067913bcc3eaf7821845c64 /README.md
parent8c316a9b4cea498dfaecf41b00b6c1df239b14cb (diff)
downloadbeku-fd2b25bb08063ed7deb09757374a260dba22ee5a.tar.xz
Add common option "-V, --vendor" to work with vendor directory
Diffstat (limited to 'README.md')
-rw-r--r--README.md51
1 files changed, 29 insertions, 22 deletions
diff --git a/README.md b/README.md
index d485bb0..013fd42 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# Beku
-Beku is a library and program to manage packages in `$GOPATH`.
+Beku is a library and program to manage packages in user's environment (GOPATH
+or vendor directory).
For beku as library see the following
[![GoDoc](https://godoc.org/github.com/shuLhan/beku?status.svg)](https://godoc.org/github.com/shuLhan/beku).
@@ -11,16 +12,16 @@ For beku as program see the below documentation or at
# Beku program
-Beku is command line program to manage packages in $GOPATH. Beku provide
-syntax like `pacman`.
+Beku is command line program to manage packages in user's environment (GOPATH
+or vendor directory). Beku provide syntax like `pacman`.
Beku read and write the package database into a file named "beku.db".
At first execution, beku will try to open the package database in current
directory. If no file found, it will try to open
-"$GOPATH/var/beku/beku.db". When both locations does not provide
-package database, beku will scan entire "$GOPATH/src" and write the
-package database into "$GOPATH/var/beku/beku.db".
+"{prefix}/var/beku/beku.db". When both locations does not provide
+package database, beku will scan entire "{prefix}/src" and write the
+package database into "{prefix}/var/beku/beku.db".
## Global Options
@@ -29,15 +30,21 @@ package database into "$GOPATH/var/beku/beku.db".
No confirmation will be asked on any operation. Useful when running beku
inside a script.
+ -V, --vendor
+
+Operate in vendor mode. This option used only when first scanning
+(`beku -V -S`).
+Any operation after that, will use the "vendor" directory in current
+working directory as installation prefix.
## Freeze Operation
-B, --freeze
-Operate on the package database and GOPATH. This operation will ensure that
-all packages listed on database file is installed with their specific
-version on GOPATH. Also, all packages that are not registered will be
-removed from GOPATH "src" and "pkg" directories.
+Operate on the package database and user's environment. This operation will
+ensure that all packages listed on database file is installed with their
+specific version. Also, all packages that are not registered will
+be removed from "src" and "pkg" directories.
## Database Operation
@@ -72,7 +79,7 @@ Query the package database.
-R, --remove [pkg]
-Remove package from GOPATH, including source and installed binaries and
+Remove package from environment, including source and installed binaries and
archives.
### Options
@@ -86,16 +93,16 @@ packages.
$ beku -R github.com/shuLhan/beku
-Remove package "github.com/shuLhan/beku" source in "$GOPATH/src",
-their installed binaries in "$GOPATH/bin", and their installed archives on
-"$GOPATH/pkg/{GOOS}_{GOARCH}".
+Remove package "github.com/shuLhan/beku" source in "{prefix}/src",
+their installed binaries in "{prefix}/bin", and their installed archives on
+"{prefix}/pkg/{GOOS}_{GOARCH}".
$ beku -R github.com/shuLhan/beku --recursive
$ beku -Rs github.com/shuLhan/beku
-Remove package "github.com/shuLhan/beku" source in "$GOPATH/src",
-their installed binaries in "$GOPATH/bin", their installed archives on
-"$GOPATH/pkg/{GOOS}_{GOARCH}", and all their dependencies.
+Remove package "github.com/shuLhan/beku" source in "{prefix}/src",
+their installed binaries in "{prefix}/bin", their installed archives on
+"{prefix}/pkg/{GOOS}_{GOARCH}", and all their dependencies.
## Sync Operation
@@ -103,7 +110,7 @@ their installed binaries in "$GOPATH/bin", their installed archives on
-S, --sync <pkg[@version]>
Synchronizes package. Given a package import path, beku will try to clone
-the package into GOPATH source directory and set the package version to
+the package into source directory and set the package version to
latest the tag. If no tag found, it will use the latest commit on master
branch. A specific version can be set using "@version" suffix.
@@ -129,23 +136,23 @@ confirmation before upgrade.
$ beku -S golang.org/x/text
-Download package `golang.org/x/text` into `$GOPATH/src/golang.org/x/text`,
+Download package `golang.org/x/text` into `{prefix}/src/golang.org/x/text`,
and set their version to the latest commit on branch master.
$ beku -S github.com/golang/text --into golang.org/x/text
Download package `github.com/golang/text` into
-`$GOPATH/src/golang.org/x/text`, and set their version to the latest commit
+`{prefix}/src/golang.org/x/text`, and set their version to the latest commit
on branch master.
$ beku -S golang.org/x/text@v0.3.0
-Download package `golang.org/x/text` into `$GOPATH/src/golang.org/x/text`
+Download package `golang.org/x/text` into `{prefix}/src/golang.org/x/text`
and checkout the tag `v0.3.0` as the working version.
$ beku -S golang.org/x/text@5c1cf69
-Download package `golang.org/x/text` into `$GOPATH/src/golang.org/x/text`
+Download package `golang.org/x/text` into `{prefix}/src/golang.org/x/text`
and checkout the commit `5c1cf69` as the working version.
$ beku -Su