From 37505a6e3ce74048b798697ea59d298ed77eb199 Mon Sep 17 00:00:00 2001 From: John Doty Date: Fri, 11 Dec 2015 11:00:19 -0800 Subject: [PATCH] Readme file and small tweak --- readme.md | 7 +++++++ setup.ps1 | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..578ea6d --- /dev/null +++ b/readme.md @@ -0,0 +1,7 @@ +# Doty's init files + +This is a git repo for your dotfiles. You know, like you do. + +On Windows, clone this into your home directory (so that it lives in +~/Init-Files) and run setup.cmd to get everything linked into the right +place. \ No newline at end of file diff --git a/setup.ps1 b/setup.ps1 index 620e38f..fad6668 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -6,11 +6,11 @@ function new-link($link, $target) { } } -$ignore = @(".gitignore", "setup.ps1") +$ignore = @(".gitignore", "setup.ps1", "setup.cmd") Get-ChildItem . | ? { !$ignore.Contains($_.Name) } | - % { + % { $l = split-path -leaf $_.FullName $p = split-path -parent (split-path -parent $_.FullName) $t = join-path $p $l @@ -18,6 +18,6 @@ Get-ChildItem . | if (test-path $t) { remove-item -recurse -force $t } - + new-link $t $($_.FullName) }