Created
March 22, 2018 08:18
-
-
Save GitHub30/ec88ea3ddafecb4e566d05582c02c22a to your computer and use it in GitHub Desktop.
Sync google drive and mysql workbench
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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