From d2ed902127b93e42bab8ee4f6aef6b97791cc00e Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sat, 17 Sep 2022 21:13:23 -0700 Subject: [PATCH] install: fix again? --- .local/bin/dotfiles-install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.local/bin/dotfiles-install.sh b/.local/bin/dotfiles-install.sh index b23aa00..0ec62d7 100755 --- a/.local/bin/dotfiles-install.sh +++ b/.local/bin/dotfiles-install.sh @@ -29,15 +29,13 @@ if ! dot checkout > /dev/null 2>&1; then mkdir -p "$DOTFILES_BACKUP_DIR" # get the list of files that need to be backed up - if ! dot checkout 2>&1 \ - | grep -Po '\t\K.*$' \ - | while read -r LINE; do + dot checkout 2>&1 \ + | grep -Po '\t\K.*$' \ + | while read -r LINE; do LINE_DIR="$(dirname "$LINE")" # No file mkdir -p "$DOTFILES_BACKUP_DIR/$LINE_DIR" mv "$HOME/$LINE" "$DOTFILES_BACKUP_DIR/$LINE_DIR" done - then echo " Backup complete" - fi # now that all the files are out of the way, we can do one final checkout dot checkout