2018-11-02 20:12:09 +08:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
#
|
|
|
|
# example usage:
|
2019-07-29 01:47:38 +08:00
|
|
|
# $GOPATH/src/github.com/rclone/rclone/cmd/info/test.sh --list | \
|
|
|
|
# parallel -P20 $GOPATH/src/github.com/rclone/rclone/cmd/info/test.sh
|
2018-11-02 20:12:09 +08:00
|
|
|
|
2019-07-29 01:47:38 +08:00
|
|
|
export PATH=$GOPATH/src/github.com/rclone/rclone:$PATH
|
2018-11-02 20:12:09 +08:00
|
|
|
|
|
|
|
typeset -A allRemotes
|
2019-05-14 23:49:55 +08:00
|
|
|
allRemotes=(
|
|
|
|
TestAmazonCloudDrive '--low-level-retries=2 --checkers=5 --upload-wait=5s'
|
2018-11-02 20:12:09 +08:00
|
|
|
TestB2 ''
|
|
|
|
TestBox ''
|
|
|
|
TestDrive '--tpslimit=5'
|
|
|
|
TestCrypt ''
|
|
|
|
TestDropbox '--checkers=1'
|
2019-05-14 23:49:55 +08:00
|
|
|
TestGCS ''
|
2018-11-02 20:12:09 +08:00
|
|
|
TestJottacloud ''
|
2019-05-14 23:49:55 +08:00
|
|
|
TestKoofr ''
|
2018-11-02 20:12:09 +08:00
|
|
|
TestMega ''
|
|
|
|
TestOneDrive ''
|
2019-05-14 23:49:55 +08:00
|
|
|
TestOpenDrive '--low-level-retries=4 --checkers=5'
|
2018-11-02 20:12:09 +08:00
|
|
|
TestPcloud '--low-level-retries=2 --timeout=15s'
|
|
|
|
TestS3 ''
|
|
|
|
Local ''
|
|
|
|
)
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
if [[ $# -eq 0 ]]; then
|
2019-05-14 23:49:55 +08:00
|
|
|
set -- ${(k)allRemotes[@]}
|
2018-11-02 20:12:09 +08:00
|
|
|
elif [[ $1 = --list ]]; then
|
|
|
|
printf '%s\n' ${(k)allRemotes[@]}
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
for remote; do
|
2019-05-14 23:49:55 +08:00
|
|
|
case $remote in
|
|
|
|
Local)
|
|
|
|
l=Local$(uname)
|
|
|
|
export RCLONE_CONFIG_${l:u}_TYPE=local
|
|
|
|
dir=$l:infotest;;
|
|
|
|
TestGCS)
|
|
|
|
dir=$remote:$GCS_BUCKET/infotest;;
|
|
|
|
*)
|
|
|
|
dir=$remote:infotest;;
|
|
|
|
esac
|
|
|
|
|
2018-11-02 20:12:09 +08:00
|
|
|
rclone purge $dir || :
|
2019-05-14 23:49:55 +08:00
|
|
|
rclone info -vv $dir --write-json=info-$remote.json ${=allRemotes[$remote]:-} &> info-$remote.log
|
2018-11-02 20:12:09 +08:00
|
|
|
rclone ls -vv $dir &> info-$remote.list
|
2019-07-29 01:47:38 +08:00
|
|
|
done
|