diff --git a/lib/homesick.rb b/lib/homesick.rb index f19aca9..5f88ce5 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -112,6 +112,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 603ad68..8159b0b 100644 --- a/lib/homesick/actions.rb +++ b/lib/homesick/actions.rb @@ -59,6 +59,11 @@ class Homesick system "git pull --quiet" 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)