diff --git a/lib/homesick.rb b/lib/homesick.rb index 634ea98..06a6210 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -125,6 +125,10 @@ class Homesick < Thor home_path = home_dir + file ln_s absolute_path, home_path end + + inside castle_path do + git_add absolute_path + end end desc "list", "List cloned castles" diff --git a/lib/homesick/actions.rb b/lib/homesick/actions.rb index 998c696..d5c0cfe 100644 --- a/lib/homesick/actions.rb +++ b/lib/homesick/actions.rb @@ -70,6 +70,11 @@ class Homesick system "git commit -v -a" unless options[:pretend] end + def git_add(file, config = {}) + say_status 'git add file', '', :green unless options[:quiet] + system "git add #{file}" unless options[:pretend] + end + def mv(source, destination, config = {}) source = Pathname.new(source) destination = Pathname.new(destination + source.basename)