diff --git a/config/rclone b/config/rclone index 3a76b22..089c670 100644 --- a/config/rclone +++ b/config/rclone @@ -1,12 +1,4 @@ [remote] type = drive -token = {"access_token":"ya29.GlsvBx0P-xi5MILSKADEHrrHNnOIExq4WopaWsjhZDdFj6xDkJ5NsLLxnJPpYDytHBtMVg5N3Z5pfE9ad0MLD5rTpmPvPScWeML_ZPj321LT-4YZGI5BVFUb7DpU","token_type":"Bearer","refresh_token":"1/w4bWtZbYRdrx6QxezVGkwYO19UAwDCrbnB9QngotBig","expiry":"2019-06-22T12:07:42.879544991-06:00"} - -[remote-enc] -type = crypt -remote = remote:cloudly/restic -filename_encryption = obfuscate -directory_name_encryption = true -password = 7goajHzgKv3SI2mamNivoqUJfHlIw1gu -password2 = 34ofTPjOpG6pVPwox8Fjaw +token = {"access_token":"ya29.GlsvB2PyW6zBpy-Cq60stS6HwJ2kZvEmpu0uqEBoF7JSNsNbQeCke4EPp67r0FRsL6SooQGX5VtiYFeXKvyea5tFYb2Hk4S91Kq_W4usIDX2G6jz_dfY9q_b60vv","token_type":"Bearer","refresh_token":"1/bCag1YzbcbjLgZEpfLZzku9l293RiEzHdVNnkdIHRSo","expiry":"2019-06-22T14:01:07.9910344-06:00"} diff --git a/sync.sh b/sync.sh index 4ecd4fe..bcecabf 100644 --- a/sync.sh +++ b/sync.sh @@ -25,9 +25,10 @@ function main() { } function install() { + mkdir -p $GOPATH/bin/$(uname) for i in ncw/rclone restic/restic; do local b="${i##*/}" - if [ -e $GOPATH/bin/$b ]; then + if [ -e $GOPATH/bin/$(uname)/$b ]; then continue fi go get -u github.com/$i @@ -35,10 +36,11 @@ function install() { case "$i" in restic* ) go run build.go - mv ./restic $GOPATH/bin + mv ./$b $GOPATH/bin/$(uname)/$b ;; * ) go install + mv $GOPATH/bin/$b $GOPATH/bin/$(uname)/$b ;; esac popd @@ -82,15 +84,15 @@ function backup() { } function RCLONE() { - $GOPATH/bin/rclone --config=$PWD/config/rclone --ask-password=false "$@" + $GOPATH/bin/$(uname)/rclone --config=$PWD/config/rclone --ask-password=false "$@" } function RESTIC() { RESTIC_PASSWORD=$PASSWORD \ - $GOPATH/bin/restic \ + $GOPATH/bin/$(uname)/restic \ -r rclone:remote:cloudly/restic-plain/backup \ - -o rclone.program=$GOPATH/bin/rclone \ - -o rclone.args="serve restic --stdio --b2-hard-delete --drive-use-trash=false --config $PWD/config/rclone --bwlimit 20M --ask-password=false" \ + -o rclone.program=$GOPATH/bin/$(uname)/rclone \ + -o rclone.args="serve restic --stdio --b2-hard-delete --drive-use-trash=false --config $PWD/config/rclone --bwlimit 6M --ask-password=false" \ "$@" #-r rclone:remote-enc:backup