Skip to content

Commit

Permalink
fix dotfiles-install
Browse files Browse the repository at this point in the history
  • Loading branch information
biocoderh committed Oct 11, 2023
1 parent 72d0ab6 commit c10cee6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .scripts/common/dotfiles-install
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GIT_DIR="$STATE_DIR/dotfiles"
BACKUP_DIR="$STATE_DIR/dotfiles-backup"
WORK_TREE_DIR="$HOME"

mkdir -p "$STATE_DIR"
mkdir -p "$STATE_DIR/"
git clone --bare "$GIT_URI" "$GIT_DIR"

dotfiles() {
Expand All @@ -18,7 +18,7 @@ if dotfiles checkout; then
echo "Checked out dotfiles."
else
echo "Backing up pre-existing dot files to $BACKUP_DIR"
dotfiles checkout 2>&1 | grep -E "\s+\." | awk "{ print $1 }" | xargs -I{} sh -c "mkdir -p $BACKUP_DIR/{}; mv $WORK_TREE_DIR/{} $BACKUP_DIR/{}"
dotfiles checkout 2>&1 | awk "/^\t/ { print $1 }" | xargs -I{} sh -c "mkdir -p $BACKUP_DIR/{}; mv $WORK_TREE_DIR/{} $BACKUP_DIR/{}"
dotfiles checkout
fi

Expand Down

0 comments on commit c10cee6

Please sign in to comment.