From b4ea5e108f4f12556c10f4c96272ee62c575dede Mon Sep 17 00:00:00 2001 From: bel Date: Wed, 8 Sep 2021 14:10:10 -0600 Subject: [PATCH] whatev --- go/pkg/linux_amd64/github.com/restic/restic.a | Bin 384 -> 0 bytes sync.sh | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) delete mode 100755 go/pkg/linux_amd64/github.com/restic/restic.a 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 44d344abbf9949ee18a7bf3b1854b2a0f5b4e2b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 384 zcmY$iNi0gvu;Yr4*9-7=cX4%7fB*w14Wb}y2x(?w0+ul}GKZ>2;7ZR|$WO{jO)gQ$ z$;>OQP)N*8F*8v}&o|UFG}1Fsh_Fg4O3Y0y$j{6xNiE_^D$UGEQOHbDP%1Mu_Oqxc zDz&K6)lH5}3{Q$r&ee}JGmZ4FG7EG{ad&ZZcXl&NPxVpa;^I*Yh819vZkkKOGS^mV%;7XvUf42^P97#aQpT@3{Pp#lKd CabO+* 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() {