Skip to content

Commit cbb4c9b

Browse files
author
Tim Heinsohn
committed
bombadil: symlink project dotfiles via posthook
1 parent c0351e7 commit cbb4c9b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

bin/symlink-project-dotfiles

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# symlink-project-dotfiles
4+
#
5+
# expects dotfiles for individual projects to reside under ~/*.dotfiles
6+
# and each project dotfiles to have a bin/symlink-dotfiles script
7+
find ~ -maxdepth 1 -type d -iname '*.dotfiles*' | while read dotfiles
8+
do
9+
symlink_script="${dotfiles}/bin/symlink-dotfiles"
10+
if [ -f "${symlink_script}" ]; then
11+
exec "${symlink_script}"
12+
fi
13+
done

bombadil.toml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dotfiles_dir = "dotfiles"
66

77
[settings]
88
prehooks = [ "mkdir -p ~/.config/rofi ~/.config/rofi-pass ~/.config/sheldon ~/.zsh" ]
9+
posthooks = [ "~/dotfiles/bin/symlink-project-dotfiles" ]
910

1011
[settings.dots]
1112
gitattributes = { source = "git/gitattributes", target = ".gitattributes" }

0 commit comments

Comments
 (0)