mirror of
https://github.com/tedkulp/dotfiles
synced 2026-04-17 21:44:30 -04:00
Added link-private function. Updated README.
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
link-private
|
||||
@@ -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
|
||||
|
||||
7
dotfiles
7
dotfiles
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user