Added link-private function. Updated README.

This commit is contained in:
Ted Kulp
2013-11-10 12:01:06 -05:00
parent 2e88904cc8
commit c5d138f6b3
3 changed files with 8 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
link-private

View File

@@ -37,8 +37,7 @@ ln -s ~/Dropbox/link-private ~/dotfiles/
```
* Run the dotfiles command. This will symlink everything into place in your home
directory. If you have some secret files to put into the dotfiles/copy directory,
now would be a good time.
directory.
```
~/dotfiles/dotfiles

View File

@@ -8,6 +8,10 @@ function link_file() {
ln -sf ${2#$HOME/} ~/
}
function link-private_file() {
ln -sf ${2#$HOME/} ~/
}
function copy_file() {
cp -f $2 ~/
}
@@ -18,7 +22,7 @@ function post_file() {
function copy_or_link() {
local base dest
local cmd="find $HOME/dotfiles/$1 -mindepth 1 -maxdepth 1"
local cmd="find -L $HOME/dotfiles/$1 -mindepth 1 -maxdepth 1"
# If no files, bail
if [ "x`${cmd}`" == "x" ]; then return; fi
@@ -33,5 +37,6 @@ function copy_or_link() {
}
copy_or_link "link"
copy_or_link "link-private"
copy_or_link "copy"
copy_or_link "post"