From 511a462290e4ef87d189a6fbc2299a5168853ec2 Mon Sep 17 00:00:00 2001 From: Jason Swank Date: Tue, 6 Jun 2023 12:33:08 -0400 Subject: [PATCH] use gnu stow if available --- install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index eb808bd..7a3ae74 100755 --- a/install.sh +++ b/install.sh @@ -3,5 +3,11 @@ # Install my dotfiles. # -rm $HOME/.zshrc $HOME/.profile -find * -maxdepth 0 -type d | xargs -I{} ./stow.sh -t $HOME {} +STOW=$(which stow) +if [ -z "$STOW" ]; then + STOW=./stow.sh +fi + +rm -f $HOME/.zshrc $HOME/.profile >/dev/null 2>&1 + +find * -maxdepth 0 -type d | xargs -I{} $STOW -t "$HOME" {}