From bddf272d82a719e46ebe2b733e230d5e4e1e40a5 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 23 Oct 2023 15:14:31 +1100 Subject: [PATCH] Migrate from .stow-rename to --dotfiles --- .stow-rename | 2 -- {config => dot-config}/zsh/functions/_dots | 0 {local => dot-local}/bin/dots | 20 ++++++++++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 .stow-rename rename {config => dot-config}/zsh/functions/_dots (100%) rename {local => dot-local}/bin/dots (86%) diff --git a/.stow-rename b/.stow-rename deleted file mode 100644 index 51f56dd..0000000 --- a/.stow-rename +++ /dev/null @@ -1,2 +0,0 @@ -config => .config -local => .local diff --git a/config/zsh/functions/_dots b/dot-config/zsh/functions/_dots similarity index 100% rename from config/zsh/functions/_dots rename to dot-config/zsh/functions/_dots diff --git a/local/bin/dots b/dot-local/bin/dots similarity index 86% rename from local/bin/dots rename to dot-local/bin/dots index 4dd5b4d..2f79a73 100755 --- a/local/bin/dots +++ b/dot-local/bin/dots @@ -15,16 +15,28 @@ bootstrap() { echo 'Bootstrapping your dotfiles...' >&2 mkdir -p $DOTFILES touch $DOTFILES/.stow - if (( ! $+commands[stow] )); then + if (( $+commands[stow] )); then + local stow_version=${"$(stow -V)"#stow*version } + if [[ $stow_version != 2.3.2-fixbug56727 ]]; then + echo "GNU Stow is installed, but version $stow_version is bugged." >&2 + echo 'See https://github.com/aspiers/stow/issues/33 for info.' >&2 + echo 'Will fetch patched version of Stow...' >&2 + install-custom-gnu-stow || return $? + fi + else echo 'GNU Stow is not installed, fetching it...' >&2 - clone-one stow || return $? - STOW=$DOTFILES/stow/local/bin/stow + install-custom-gnu-stow || return $? fi clone dots git vim zsh || return $? link } +install-custom-gnu-stow() { + clone-one stow || return $? + STOW=$DOTFILES/stow/dot-local/bin/stow +} + clone() { echo "Requested packages: $argv" >&2 for package in $argv; do @@ -63,7 +75,7 @@ link() { for nofold in $DOTFILES/${^packages}/.stow-no-folding(N); process-stow-no-folding $nofold - $STOW -d $DOTFILES -t ~ --ignore=${^global_ignore} $packages + $STOW --dotfiles -d $DOTFILES -t ~ --ignore=${^global_ignore} $packages } process-stow-no-folding() {