Skip to content

Instantly share code, notes, and snippets.

@professorjamesmoriarty
Created January 26, 2016 13:35
Show Gist options
  • Save professorjamesmoriarty/b411561fa94ed01711ce to your computer and use it in GitHub Desktop.
Save professorjamesmoriarty/b411561fa94ed01711ce to your computer and use it in GitHub Desktop.
#!/bin/bash
STATUS=$(dropbox status)
if [ "$STATUS" == "Dropbox isn't running!" ]; then
START=$(dropbox start)
fi
COUNT_DONE=1
while true
do
STATUS=$(dropbox status)
if [ "$STATUS" == "Up to date" ]; then
COUNT_DONE=`expr $COUNT_DONE + 1`
if [ $COUNT_DONE -gt 10 ]
then
STOP=$(dropbox stop)
break;
fi
fi
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment