diff --git a/go/pkg/linux_amd64/github.com/restic/restic.a b/go/pkg/linux_amd64/github.com/restic/restic.a deleted file mode 100755 index 44d344a..0000000 Binary files a/go/pkg/linux_amd64/github.com/restic/restic.a and /dev/null differ diff --git a/sync.sh b/sync.sh index 89e892d..3a9cdcd 100755 --- a/sync.sh +++ b/sync.sh @@ -27,14 +27,23 @@ function main() { } function install() { + if ! go version; then + echo "Must install go" >&2 + exit 1 + fi + export GOFLAGS="" mkdir -p "$GOPATH/bin/$(uname)" for i in ncw/rclone restic/restic; do local b="${i##*/}" if [ -e "$GOPATH/bin/$(uname)/$b" ]; then continue fi - go get -u "github.com/$i" || true - pushd "$GOPATH/src/github.com/$i" + mkdir -p $GOPATH/src/github.com/${i%/*} + #go get -u "github.com/$i" || true + pushd "$GOPATH/src/github.com/${i%/*}" + git clone --depth 1 --branch master https://github.com/$i + cd ${i##*/} + go get ./... case "$i" in restic* ) go run build.go @@ -116,7 +125,9 @@ function restore() { fi mv "$HOME/$path-restore" "$HOME/$path" done - clean_remote + if [ -z "${DIRTY:-}" ]; then + clean_remote + fi } function clean_remote() {