From ac48fa5a5c361ccbff39d453e53015e51acc8568 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 28 Mar 2018 13:25:19 -0400 Subject: Fix shell script lints --- link.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'link.zsh') diff --git a/link.zsh b/link.zsh index f5ed565c..8d573ceb 100755 --- a/link.zsh +++ b/link.zsh @@ -5,15 +5,15 @@ if [[ $# -eq 1 ]]; then linkPath="$1" filePath="$PWD/home/${linkPath#$HOME/}" [[ ! -f "$filePath" ]] - mkdir -p $(dirname "$filePath") + mkdir -p "$(dirname "$filePath")" mv "$linkPath" "$filePath" fi -find home -type f | while read findPath; do +find home -type f | while read -r findPath; do filePath="$PWD/$findPath" linkPath="$HOME/${findPath#home/}" [[ -L "$linkPath" ]] && continue - mkdir -p $(dirname "$linkPath") + mkdir -p "$(dirname "$linkPath")" ln -s "$filePath" "$linkPath" echo "$linkPath" done -- cgit 1.4.1