Created
June 18, 2017 15:07
-
-
Save battis/8b9a663d167da42d8259f47cdc4c88ef to your computer and use it in GitHub Desktop.
Is Google Drive Syncing? [Blink1]
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
RED=0 | |
GREEN=255 |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
source $DIR/google-drive-sync.cfg | |
function redder { | |
(( RED++ )) | |
(( GREEN-- )) | |
(( GREEN < 0 )) && GREEN=0 | |
(( RED > 255 )) && RED=255 | |
} | |
function greener { | |
(( RED-- )) | |
(( GREEN++ )) | |
(( RED < 0 )) && RED=0 | |
(( GREEN > 255 )) && GREEN=255 | |
} | |
for f in ~/Google\ Drive/.tmp.drivedownload/* | |
do | |
if [ -e "$f" ] | |
then | |
redder | |
else | |
greener | |
fi | |
break | |
done | |
printf "RED=%d\nGREEN=%d\n" $RED $GREEN > $DIR/google-drive-sync.cfg | |
printf "#%02X%02X00\n" $RED $GREEN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment