From 431b1a0640f74e0cfe52e740272579b5eeda6e0b Mon Sep 17 00:00:00 2001 From: Ryan Kes <511318+alrayyes@users.noreply.github.com> Date: Sun, 10 Nov 2019 20:50:18 +0100 Subject: [PATCH] Refacatored install script incorporating shellcheck recommendations --- README.md | 9 +++++++-- install | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1971bd2..75bd248 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,12 @@ A repository of my personal configuration files. ./install.sh ``` -# Packages Configured +# Find & delete orphaned symlinks +```shell +./clean-dead-symlinks +``` + +# Packages configured * [dunst](https://dunst-project.org/) * [firejail](https://firejail.wordpress.com/) @@ -33,7 +38,7 @@ A repository of my personal configuration files. * [weechat](https://weechat.org/) * [zsh](https://www.zsh.org/) -# Custom Packages configured +# Custom packages configured These are custom packages I use (mostly [suckless](https://suckless.org/)). diff --git a/install b/install index 8f38290..2f58cef 100755 --- a/install +++ b/install @@ -1,6 +1,6 @@ #!/usr/bin/env bash -for d in `ls -d */ | cut -f1 -d '/'`; +for d in $(find -- */ -maxdepth 0 -type d | cut -f1 -d '/'); do - ( stow -t $HOME $d ) + ( stow -t "$HOME" "$d" ) done