Skip to content

Commit

Permalink
try linking symlink files on every updot
Browse files Browse the repository at this point in the history
This might be pretty repetitive, but it's fine enough as far as I'm
concerned. It's not like running updot is something that's going to
happen all the time (like several times a day), _and_ it's not like
updot isn't already pretty repetitive, with the output from brew bundle
and all that.
  • Loading branch information
ymendel committed Aug 27, 2021
1 parent bc05de8 commit ed1fa84
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 0 additions & 1 deletion script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# bootstrap the entire dotfiles experience on this computer
# but safe to run periodically
# (n.b. this is the main way to automatically handle .symlink files)

set -e

Expand Down
24 changes: 24 additions & 0 deletions system/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."
# need to get the canonical path, not just ~/.dotfiles
DOTFILES_ROOT=$(pwd -P)

source "$DOTFILES_HOME/script/helpers/printing.sh"
source "$DOTFILES_HOME/script/helpers/linking.sh"

link_dotfiles () {
info 'linking dotfiles'

local overwrite_all=false backup_all=false skip_all=false

for src in $(find $DOTFILES_ROOT -name '*.symlink' -type f)
do
dst="$HOME/.$(basename ${src%.symlink})"
link_file $src $dst
done
}

link_dotfiles

0 comments on commit ed1fa84

Please sign in to comment.