Cloning will now try to init and update git submodules, if they exist.
This commit is contained in:
@@ -5,7 +5,7 @@ class Homesick
|
||||
config ||= {}
|
||||
destination = config[:destination] || begin
|
||||
repo =~ /([^\/]+)\.git$/
|
||||
$1
|
||||
$1
|
||||
end
|
||||
|
||||
destination = Pathname.new(destination) unless destination.kind_of?(Pathname)
|
||||
@@ -19,6 +19,16 @@ class Homesick
|
||||
end
|
||||
end
|
||||
|
||||
def git_submodule_init(config = {})
|
||||
say_status 'git submodule', 'init', :green unless options[:quiet]
|
||||
system "git submodule --quiet init" unless options[:pretend]
|
||||
end
|
||||
|
||||
def git_submodule_update(config = {})
|
||||
say_status 'git submodule', 'update', :green unless options[:quiet]
|
||||
system "git submodule --quiet update >/dev/null 2>&1" unless options[:pretend]
|
||||
end
|
||||
|
||||
def ln_s(source, destination, config = {})
|
||||
source = Pathname.new(source)
|
||||
destination = Pathname.new(destination)
|
||||
|
||||
Reference in New Issue
Block a user