summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2014-04-10 19:51:54 +0100
committerAlan Pearce2014-04-10 19:51:54 +0100
commit4cd3145a5447154c2836580a004f374a0af3600f (patch)
tree66288002ed5a099e22689a9e6e6805dd56adcabb
parent04cc33e57f39991c645580d85a82c7246998190d (diff)
downloaddotfiles-4cd3145a5447154c2836580a004f374a0af3600f.tar.lz
dotfiles-4cd3145a5447154c2836580a004f374a0af3600f.tar.zst
dotfiles-4cd3145a5447154c2836580a004f374a0af3600f.zip
Install: clone repository before linking
-rwxr-xr-xinstall8
1 files changed, 4 insertions, 4 deletions
diff --git a/install b/install
index 530e7a3..d3eaf06 100755
--- a/install
+++ b/install
@@ -10,14 +10,14 @@ then
 	mkdir -pv $target
 fi
 
-if [[ -d ~/Library/LaunchAgents ]]
+if [[ ! -d $target && ${(L)host} =~ prefect ]]
 then
-	ln -sf $target/launchagents/* ~/Library/LaunchAgents
+	git clone git://github.com/alanpearce/dotfiles.git $target
 fi
 
-if [[ ! -d $target && ${(L)host} =~ prefect ]]
+if [[ -d ~/Library/LaunchAgents ]]
 then
-	git clone git://github.com/alanpearce/dotfiles.git $target
+	ln -sf $target/launchagents/* ~/Library/LaunchAgents
 fi
 
 install-dot () {