Add a generic way to prevent Stow folding overzealously, instead of hardcoding the handling

This commit is contained in:
Danielle McLean 2016-10-04 12:31:49 +11:00
parent bfd00c22a0
commit 33adac1412
No known key found for this signature in database
GPG key ID: CC91589719027E94

View file

@ -1,4 +1,5 @@
#!/usr/bin/env zsh
zmodload zsh/mapfile
bootstrap() {
echo 'Bootstrapping your dotfiles...' >&2
@ -10,7 +11,6 @@ bootstrap() {
STOW=$DOTFILES/stow/.local/bin/stow
fi
mkdir -p ~/.zsh && touch ~/.zsh/zhistory
clone dots vim zsh || return $?
link
}
@ -49,7 +49,19 @@ link() {
else
echo "Linking $packages into $HOME now..." >&2
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() {