Add option to check file if network is shoddy.

Avoids hitting network on bad connections.
This commit is contained in:
Bradley M. Kuhn 2016-08-15 06:17:53 -07:00
parent c523eb5d3b
commit aafd95a24b

View file

@ -49,6 +49,10 @@ set -e
/usr/bin/git status > /dev/null
# Make sure machine is up. set -e will ensure that.
if [ -f $HOME/.shoddy-network ]; then
exit 0
fi
/bin/ping -q -w 20 -c 5 $HOME_MACHINE > /dev/null 2>&1
cd ~/calendars/personal/private/bkuhn