bootstrap: only symlink nested dotfiles if parent directory is XDG_CONFIG_HOME
This commit is contained in:
parent
0bf9161839
commit
fba5c72a40
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue