wiki:gdrive_dload_script
- gdrive_dload.sh
#!/bin/bash MAILS=( user1@example.com user2@example.com ) for MAIL in "${MAILS[@]}" do echo "==========================================================================" echo ">> Downloading Google drive files for user ${MAIL}" echo "==========================================================================" /home/antisa/bin/gam/gam user "${MAIL}" get drivefile query "'me' in owners" targetfolder gdrive_dload/"${MAIL}-gdrive" echo ">> Compressing folder for "${MAIL}"" zip --quiet --recurse-paths --compression-method bzip2 gdrive_dload/"${MAIL}-gdrive.zip" gdrive_dload/"${MAIL}-gdrive" echo ">> Removing folder for "${MAIL}"" rm -rf gdrive_dload/"${MAIL}-gdrive" done
References
wiki/gdrive_dload_script.txt · Last modified: 2021/01/13 09:11 by antisa