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