diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-09-05 11:16:58 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-09-05 11:16:58 -0400 |
commit | 9573bcd777e186e18840d9dcb22c11433cc8c964 (patch) | |
tree | 2a9704efaa989af4cadca9ea6249cd48b0ad6993 /lib/sisu/v3/git.rb | |
parent | debian/changelog (3.0.16-1) (diff) | |
parent | v3: sisupod_v3 make (build); place (rsync); process (generate sisu output from) (diff) |
Merge commit 'sisu-3.0.17' into debian/sid
Diffstat (limited to 'lib/sisu/v3/git.rb')
-rw-r--r-- | lib/sisu/v3/git.rb | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/sisu/v3/git.rb b/lib/sisu/v3/git.rb index 45eb3f75..2e76fa4a 100644 --- a/lib/sisu/v3/git.rb +++ b/lib/sisu/v3/git.rb @@ -114,7 +114,7 @@ module SiSU_Git end unless @opt.cmd =~/q/ @opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'Git path',@git_path[:fnb]).green_hi_blue \ + ? SiSU_Screen::Ansi.new(@opt.cmd,'Git path',@git_path[:fnb]).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'Git path',@git_path[:fnb]).green_title_hi SiSU_Screen::Ansi.new(@opt.cmd,"Git path","#{@opt.fns} -> #{@git_path[:fnb]}").warn if @opt.cmd =~/[MVv]/ end @@ -136,16 +136,22 @@ module SiSU_Git end def git_init unless FileTest.directory?("#{@git_path[:fnb]}/.git") - system("cd #{@git_path[:fnb]}\ - && git init - ") + pwd=Dir.pwd + Dir.chdir(@git_path[:fnb]) + system("git init ") + Dir.chdir(pwd) end end def git_commit - system("cd #{@git_path[:fnb]} \ - && git add . \ - && git commit -a - ") + if FileTest.directory?("#{@git_path[:fnb]}") + pwd=Dir.pwd + Dir.chdir(@git_path[:fnb]) + system(" + git add . \ + && git commit -a + ") + Dir.chdir(pwd) + end end def populate def identify_language_versions |