Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit 6b50b1a

Browse files
committed
automatically symlink files to home
1 parent 2c5a391 commit 6b50b1a

6 files changed

Lines changed: 3 additions & 8 deletions

File tree

‎README.markdown‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Notice the simple directory display, the branch set on the right, the color and
3030

3131
Beyond that, some Ruby aliases, some git helper scripts, some system helper scripts.
3232

33-
If you're adding a new area to your forked repo — say, "Java" — you can simply add a `java` directory and put files in there. Anything with an extension of `.zsh` will get automatically included into your shell profile. If you want to add a file that gets symlinked into `$HOME`, look at `Rakefile` and see how I do it for things like `ruby/irbrc`, for example.
33+
If you're adding a new area to your forked repo — say, "Java" — you can simply add a `java` directory and put files in there. Anything with an extension of `.zsh` will get automatically included into your shell profile. Anything with an extension of `.symlink` will get symlinked without extension into `$HOME` when you run `rake install`.
3434

3535
## thanks
3636

‎Rakefile‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@ require 'rake'
22

33
desc "Let's hook this motherfucker into your system"
44
task :install do
5-
linkables = %w(
6-
git/gitignore
7-
ruby/gemrc
8-
ruby/irbrc
9-
zsh/zshrc
10-
)
5+
linkables = Dir.glob('*/**{.symlink}')
116

127
linkables.each do |linkable|
13-
file = linkable.split('/').last
8+
file = linkable.split('/').last.split('.').first
149
`ln -s "$PWD/#{linkable}" "$HOME/.#{file}"`
1510
end
1611
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)