It was originally giving me errors, and I made some modifications. But alas, I guess I’m having some trouble understanding a portion of the script. Wondering if there are any more recent versions of this?
exec 6>&1;num_procs=3;output=“go”; while [ “$output” ]; do output=$(find “/home/shorton/odrive-agent-mount/” -name “.cloud” -print0 | xargs -0 -n 1 -P $num_procs python $(ls -d “$HOME/.odrive-agent/bin/”*/ | tail -1)/home/shorton/.odrive-agent/bin/odrive.py sync | tee /dev/fd/6); done
shorton@shorton-NV79:~/odrive-agent-mount$ ~/Downloads/odrive/download_amazon_cloud.sh
ls: cannot access ‘/home/shorton/.odrive/bin/*/’: No such file or directory
usage: odrive.py sync [-h] placeholderPath
odrive.py sync: error: too few arguments
Thanks Tony; this ran and appeared to perform a full download / sync of all folders in the amazon drive account. If I run it a 2nd time (to check if anything else needs to be downloaded), there are no more remaining .cloud files (I ran ‘find’ manually), and this command gives:
usage: odrive.py sync [-h] placeholderPath
odrive.py sync: error: too few arguments
Is this what you expect it to output? If so, per my understanding, if I wanted to download a new deltas, I would need to mount again and start over, or is there a command (or update script) to ‘update’ this already mounted location?
Hi @shorton3,
odrive will automatically detect remote changes and create placeholders for those. You can test this out by adding some files to Amazon Drive account through their web client or the odrive web client.
Remote changes on Amazon Drive should be picked up within a few minutes by the odrive sync engine. If you run the same script again, it will sync those.
The output you see when everything is already synced is expected. It is getting this message because the find command is not finding any placeholder files, so the output feeding into the odrive.py command is empty.