remove old lock files so that upgrades don't get stuck

whole-command-tab-completion
bretello 2020-02-27 18:34:50 +01:00
parent 80c4ec608f
commit 39c0a11b62
1 changed files with 3 additions and 0 deletions

View File

@ -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