whatev
parent
622ceaa922
commit
b4ea5e108f
Binary file not shown.
17
sync.sh
17
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() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue