From 73bde45645081129e0eb448d12055d9c2ddbe7e1 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 2 Feb 2022 17:53:24 +0100 Subject: [PATCH] install: ensure the script can be run from anywhere --- install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 6038f93..9761ed3 100755 --- a/install.sh +++ b/install.sh @@ -43,16 +43,15 @@ greeting() { } deploy_packages() { - for f in *; do - [ -d "$f" ] && { - heading "$f" - deploy "$f" - } + for item in "$DOTFILES"/*; do + [ ! -d "$item" ] && continue + heading "${item#$DOTFILES/}" + deploy "$item" done } bin_extras() { - heading 'stale ~/.local/bin commands' + heading "stale $TARGET/.local/bin commands" for cmd in $TARGET/.local/bin/*; do prune_cmd "$cmd"; done; }