Skip to content

Instantly share code, notes, and snippets.

@battis
Created June 18, 2017 15:07
Show Gist options
  • Save battis/8b9a663d167da42d8259f47cdc4c88ef to your computer and use it in GitHub Desktop.
Save battis/8b9a663d167da42d8259f47cdc4c88ef to your computer and use it in GitHub Desktop.
Is Google Drive Syncing? [Blink1]
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