summary refs log tree commit diff
path: root/link.zsh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-05-13 00:37:16 -0400
committerJune McEnroe <june@causal.agency>2018-05-13 00:42:27 -0400
commit758b40ccc4193535bd07801d554bf5416969804d (patch)
tree2a196a6fc7a9ad7dc0c0360ee90b6ceb454dcad7 /link.zsh
parentI've really done it now (diff)
downloadsrc-758b40ccc4193535bd07801d554bf5416969804d.tar.gz
src-758b40ccc4193535bd07801d554bf5416969804d.zip
Tabify shell scripts
Diffstat (limited to '')
-rwxr-xr-xlink.zsh20
1 files changed, 10 insertions, 10 deletions
diff --git a/link.zsh b/link.zsh
index e9fa64ca..a0a9e7aa 100755
--- a/link.zsh
+++ b/link.zsh
@@ -2,17 +2,17 @@
 set -o errexit -o nounset -o pipefail
 
 if [[ $# -eq 1 ]]; then
-    linkPath="$1"
-    filePath="$PWD/home/${linkPath#$HOME/}"
-    [[ ! -f "$filePath" ]]
-    mkdir -p "$(dirname "$filePath")"
-    mv "$linkPath" "$filePath"
+	linkPath="$1"
+	filePath="$PWD/home/${linkPath#$HOME/}"
+	[[ ! -f "$filePath" ]]
+	mkdir -p "$(dirname "$filePath")"
+	mv "$linkPath" "$filePath"
 fi
 
 find home -type f | while read -r findPath; do
-    filePath="$PWD/$findPath"
-    linkPath="$HOME/${findPath#home/}"
-    mkdir -p "$(dirname "$linkPath")"
-    [[ ( -f "$linkPath" && -L "$linkPath" ) || ! -f "$linkPath" ]]
-    ln -s -f "$filePath" "$linkPath"
+	filePath="$PWD/$findPath"
+	linkPath="$HOME/${findPath#home/}"
+	mkdir -p "$(dirname "$linkPath")"
+	[[ ( -f "$linkPath" && -L "$linkPath" ) || ! -f "$linkPath" ]]
+	ln -s -f "$filePath" "$linkPath"
 done