aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/MANPAGE.md5
-rwxr-xr-xbuild.bash2
-rw-r--r--main.go5
3 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/MANPAGE.md b/Documentation/MANPAGE.md
index 5f2ae47..1444c2b 100644
--- a/Documentation/MANPAGE.md
+++ b/Documentation/MANPAGE.md
@@ -125,7 +125,10 @@ option.
mounting but makes the password susceptible to brute-force attacks (default 16)
**-version**
-: Print version and exit
+: Print version and exit. The output contains three fields seperated by
+";". Example: "gocryptfs v0.12-2; go-fuse a4c968c; go1.6.2".
+Field 1 is the gocryptfs version, field 2 is the version of the go-fuse
+library, field 3 is the Go version that was used to compile the binary.
**-wpanic**
: When encountering a warning, panic and exit immediately. This is
diff --git a/build.bash b/build.bash
index c7731ca..829953b 100755
--- a/build.bash
+++ b/build.bash
@@ -12,7 +12,7 @@ GITVERSIONFUSE=$(cd $GOPATH/src/github.com/hanwen/go-fuse && git rev-parse --sho
# Make sure we have the go binary
go version > /dev/null
-# go version go1.5.1 linux/amd64
+# "go version go1.6.2 linux/amd64" -> "1.6"
V=$(go version | cut -d" " -f3 | cut -c3-5)
if [ $V == "1.3" -o $V == "1.4" ]
diff --git a/main.go b/main.go
index b29b2f6..6467b4b 100644
--- a/main.go
+++ b/main.go
@@ -151,8 +151,8 @@ func changePassword(args *argContainer) {
// printVersion - print a version string like
// "gocryptfs v0.3.1-31-g6736212-dirty; on-disk format 2"
func printVersion() {
- fmt.Printf("%s %s; on-disk format %d; go-fuse %s\n",
- tlog.ProgramName, GitVersion, contentenc.CurrentVersion, GitVersionFuse)
+ fmt.Printf("%s %s; go-fuse %s; %s\n",
+ tlog.ProgramName, GitVersion, GitVersionFuse, runtime.Version())
}
func main() {
@@ -218,6 +218,7 @@ func main() {
// "-v"
if args.version {
tlog.Debug.Printf("openssl=%v\n", args.openssl)
+ tlog.Debug.Printf("on-disk format %d\n", contentenc.CurrentVersion)
printVersion()
os.Exit(0)
}