summary refs log tree commit diff
path: root/link.zsh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-03-28 13:25:19 -0400
committerJune McEnroe <june@causal.agency>2018-03-28 13:38:23 -0400
commit626ae973644c16c37ae8985857eade9648ba2364 (patch)
treed0049c786c5aad844cb4f470c338e9543044d8d0 /link.zsh
parentUse [[ ]] in zsh scripts (diff)
downloadsrc-626ae973644c16c37ae8985857eade9648ba2364.tar.gz
src-626ae973644c16c37ae8985857eade9648ba2364.zip
Fix shell script lints
Diffstat (limited to 'link.zsh')
-rwxr-xr-xlink.zsh6
1 files changed, 3 insertions, 3 deletions
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