Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1901b3a83 | ||
|
|
cc39d30f09 | ||
|
|
a798f3c562 |
@@ -1,3 +1,7 @@
|
||||
# 0.4.1
|
||||
|
||||
* Improved error message when a castle's home dir doesn't exist
|
||||
|
||||
# 0.4.0
|
||||
|
||||
* `homesick clone` can now take a path to a directory on the filesystem, which will be symlinked into place
|
||||
|
||||
2
Rakefile
2
Rakefile
@@ -22,7 +22,7 @@ Jeweler::Tasks.new do |gem|
|
||||
gem.email = "josh@technicalpickles.com"
|
||||
gem.homepage = "http://github.com/technicalpickles/homesick"
|
||||
gem.authors = ["Joshua Nichols"]
|
||||
gem.version = "0.4.0"
|
||||
gem.version = "0.4.1"
|
||||
# Have dependencies? Add them to Gemfile
|
||||
|
||||
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = %q{homesick}
|
||||
s.version = "0.4.0"
|
||||
s.version = "0.4.1"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Joshua Nichols"]
|
||||
s.date = %q{2010-04-01}
|
||||
s.date = %q{2010-04-02}
|
||||
s.default_executable = %q{homesick}
|
||||
s.description = %q{
|
||||
A man’s home (directory) is his castle, so don’t leave home with out it.
|
||||
|
||||
@@ -45,27 +45,25 @@ class Homesick < Thor
|
||||
end
|
||||
|
||||
desc "symlink NAME", "Symlinks all dotfiles from the specified castle"
|
||||
def symlink(home)
|
||||
unless castle_dir(home).exist?
|
||||
say_status :error, "Castle #{home} did not exist in #{repos_dir}", :red
|
||||
def symlink(name)
|
||||
unless castle_dir(name).exist?
|
||||
say_status :error, "Could not symlink #{name}, expected #{castle_dir(name)} exist and contain dotfiles", :red
|
||||
|
||||
exit(1)
|
||||
end
|
||||
|
||||
else
|
||||
inside castle_dir(home) do
|
||||
files = Pathname.glob('.*').reject{|a| [".",".."].include?(a.to_s)}
|
||||
files.each do |path|
|
||||
absolute_path = path.expand_path
|
||||
inside castle_dir(name) do
|
||||
files = Pathname.glob('.*').reject{|a| [".",".."].include?(a.to_s)}
|
||||
files.each do |path|
|
||||
absolute_path = path.expand_path
|
||||
|
||||
inside home_dir do
|
||||
adjusted_path = (home_dir + path).basename
|
||||
inside home_dir do
|
||||
adjusted_path = (home_dir + path).basename
|
||||
|
||||
ln_s absolute_path, adjusted_path
|
||||
end
|
||||
ln_s absolute_path, adjusted_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
desc "list", "List cloned castles"
|
||||
|
||||
Reference in New Issue
Block a user