Skip to content

Instantly share code, notes, and snippets.

@aenniw
Created May 20, 2017 14:39
Show Gist options
  • Save aenniw/54db7dd399afdd42d325e8945fdf32fe to your computer and use it in GitHub Desktop.
Save aenniw/54db7dd399afdd42d325e8945fdf32fe to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
DIR_NAMES=( "www.domain1.org" "www.domain1.org" );
cd ${1:-./}
for DIR_NAME in "${DIR_NAMES[@]}"; do
echo ok
DIR_ID=`gdrive list -m 500 -q "sharedWithMe = true" | grep -i ${DIR_NAME} | awk '{ print $1 }'`
gdrive download --recursive --force ${DIR_ID}
done
cd ${OLDPWD}
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment