summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rwxr-xr-xuser/install.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/user/install.sh b/user/install.sh
index 8e0ca702..e33b70ae 100755
--- a/user/install.sh
+++ b/user/install.sh
@@ -16,5 +16,19 @@ then
   exit 1
 fi
 
+if [ -d "$NIXDIR" ]
+then
+  echo "$NIXDIR already exists as a directory!"
+  ls -l "$NIXDIR"
+  exit
+fi
+
+if [ -f "$NIXDIR" ]
+then
+  echo "$NIXDIR already exists as a file"
+  ls -l "$NIXDIR"
+  exit
+fi
+
 ln -s $PWD $NIXDIR
 ln -s $1 home.nix