Shell wrapper: Also search the binary in $GOPATH/bin
This commit is contained in:
parent
7ac9d6af58
commit
a3e66ca154
|
@ -26,7 +26,7 @@ Current Status
|
||||||
Install
|
Install
|
||||||
-------
|
-------
|
||||||
|
|
||||||
$ go get github.com/rfjakob/gocryptfs/...
|
$ go get github.com/rfjakob/gocryptfs/gocryptfs_main
|
||||||
|
|
||||||
(The dots are important!)
|
(The dots are important!)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Shell wrapper that runs the gocryptfs process in the background
|
# Wrapper that runs the gocryptfs process in the background
|
||||||
# and exits on SIGUSR1
|
# and exits on SIGUSR1
|
||||||
|
#
|
||||||
|
# Written in shell because Go does not support daemonization natively
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
@ -11,8 +13,10 @@ shopt -u huponexit
|
||||||
dir=$(dirname $(readlink -f "$0"))
|
dir=$(dirname $(readlink -f "$0"))
|
||||||
main="$dir/gocryptfs_main"
|
main="$dir/gocryptfs_main"
|
||||||
|
|
||||||
# echo "0=$0 dir=$dir main=$main"
|
if [ ! -x "$main" ]
|
||||||
|
then
|
||||||
|
main="$GOPATH/bin/gocryptfs_main"
|
||||||
|
fi
|
||||||
if [ ! -x "$main" ]
|
if [ ! -x "$main" ]
|
||||||
then
|
then
|
||||||
echo "Error: gocryptfs_main executable not found. Run ./all.bash to build it."
|
echo "Error: gocryptfs_main executable not found. Run ./all.bash to build it."
|
||||||
|
|
Loading…
Reference in New Issue