Add a generic way to prevent Stow folding overzealously, instead of hardcoding the handling
This commit is contained in:
parent
bfd00c22a0
commit
33adac1412
1 changed files with 14 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
zmodload zsh/mapfile
|
||||||
|
|
||||||
bootstrap() {
|
bootstrap() {
|
||||||
echo 'Bootstrapping your dotfiles...' >&2
|
echo 'Bootstrapping your dotfiles...' >&2
|
||||||
|
@ -10,7 +11,6 @@ bootstrap() {
|
||||||
STOW=$DOTFILES/stow/.local/bin/stow
|
STOW=$DOTFILES/stow/.local/bin/stow
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p ~/.zsh && touch ~/.zsh/zhistory
|
|
||||||
clone dots vim zsh || return $?
|
clone dots vim zsh || return $?
|
||||||
link
|
link
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,19 @@ link() {
|
||||||
else
|
else
|
||||||
echo "Linking $packages into $HOME now..." >&2
|
echo "Linking $packages into $HOME now..." >&2
|
||||||
fi
|
fi
|
||||||
$STOW -d $DOTFILES -t ~ $packages
|
|
||||||
|
for nofold in $DOTFILES/${^packages}/.stow-no-fold(N); process-stow-no-fold $nofold
|
||||||
|
|
||||||
|
$STOW -d $DOTFILES -t ~ --ignore '^\.stow-no-fold' $packages
|
||||||
|
}
|
||||||
|
|
||||||
|
process-stow-no-fold() {
|
||||||
|
for file in ${(f)mapfile[$1]}; do
|
||||||
|
file=~/$file
|
||||||
|
[[ -e $file ]] && continue
|
||||||
|
mkdir -p ${file:h}
|
||||||
|
touch $file
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
status() {
|
status() {
|
||||||
|
|
Loading…
Reference in a new issue