Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Created March 22, 2018 08:18
Show Gist options
  • Save GitHub30/ec88ea3ddafecb4e566d05582c02c22a to your computer and use it in GitHub Desktop.
Save GitHub30/ec88ea3ddafecb4e566d05582c02c22a to your computer and use it in GitHub Desktop.
Sync google drive and mysql workbench
#!/usr/bin/env bash
cd "$(dirname "$0")"
fileId='1Q8soWRA8r0OhGP1PUVm_wO9Nf6JR7L9u'
filename=$(gdrive info $fileId | grep -Po '(?<=^Name: ).*')
gdrive download --force $fileId
observation="inotifywait -e MOVE_SELF $filename"
while $observation
do
gdrive update $fileId $filename
done &
mysql-workbench --model $filename
pkill -f "$observation"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment