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) # Symlink dotfiles from topic directories (2 levels deep)
[[ "$link" ]] || continue [[ "$link" ]] || continue
for file in "$tpath"/.[a-zA-Z]*; do for file in "$tpath"/.[a-zA-Z]*; do
if [[ -d $file ]]; then if [[ -d $file && "${file##*/}" == .config ]]; then
for subfile in "$file"/*; do for subfile in "$file"/*; do
base="$HOME/${file##*/}/" base="$HOME/${file##*/}/"
[[ -d $base ]] || _run mkdir -p "$base" [[ -d $base ]] || _run mkdir -p "$base"
_link "$subfile" "$base" _link "$subfile" "$base"
done done
elif [[ -f $file ]]; then elif [[ -e $file ]]; then
_link "$file" "$HOME/" _link "$file" "$HOME/"
fi fi
done done