From 39c0a11b6215d8127c0c1f39bca27aae95afc46f Mon Sep 17 00:00:00 2001 From: bretello Date: Thu, 27 Feb 2020 18:34:50 +0100 Subject: [PATCH] remove old lock files so that upgrades don't get stuck --- check_for_update.sh | 3 +++ 1 file changed, 3 insertions(+) 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