bootstrap: only symlink nested dotfiles if parent directory is XDG_CONFIG_HOME

This commit is contained in:
Henrik Lissner 2016-12-23 03:16:13 -05:00
parent 0bf9161839
commit fba5c72a40

View file

@ -117,13 +117,13 @@ for topic in ${@:-$(find "$ENABLED_DIR" -maxdepth 1 -type l)}; do
# Symlink dotfiles from topic directories (2 levels deep)
[[ "$link" ]] || continue
for file in "$tpath"/.[a-zA-Z]*; do
if [[ -d $file ]]; then
if [[ -d $file && "${file##*/}" == .config ]]; then
for subfile in "$file"/*; do
base="$HOME/${file##*/}/"
[[ -d $base ]] || _run mkdir -p "$base"
_link "$subfile" "$base"
done
elif [[ -f $file ]]; then
elif [[ -e $file ]]; then
_link "$file" "$HOME/"
fi
done