diff --git a/check_for_update.sh b/check_for_update.sh index 8b3aa62..e08a653 100755 --- a/check_for_update.sh +++ b/check_for_update.sh @@ -44,6 +44,9 @@ fi # Cancel upgrade if git is unavailable on the system whence git >/dev/null || return 0 +# Clean up old lock files +find $DOTFILES/update.lock -mmin 60 -exec rm {} \; &>/dev/null + if mkdir "$DOTFILES/update.lock" 2>/dev/null; then if [ -f ~/.dotfiles-update ]; then . ~/.dotfiles-update