Skip to content

Instantly share code, notes, and snippets.

@professorjamesmoriarty
Created January 23, 2016 21:48
Show Gist options
  • Save professorjamesmoriarty/5c0693e217b97b76c92f to your computer and use it in GitHub Desktop.
Save professorjamesmoriarty/5c0693e217b97b76c92f 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