diff options
Diffstat (limited to 'lib/sisu/v2/share_src.rb')
-rw-r--r-- | lib/sisu/v2/share_src.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/sisu/v2/share_src.rb b/lib/sisu/v2/share_src.rb index d0f1923e..9ea2fac0 100644 --- a/lib/sisu/v2/share_src.rb +++ b/lib/sisu/v2/share_src.rb @@ -70,10 +70,12 @@ module SiSU_Markup @output_path="#{@env.path.output}/src" end def read - tell=SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns) - tell.green_hi_blue unless @opt.cmd =~/q/ - tell=SiSU_Screen::Ansi.new(@opt.cmd,"Copy sisu markup file to output directory","#{@opt.fns} -> #{@output_path}") - tell.warn unless @opt.cmd =~/q/ + unless @opt.cmd =~/q/ + @opt.cmd=~/[MVvz]/ \ + ? SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_hi_blue \ + : SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_title_hi + SiSU_Screen::Ansi.new(@opt.cmd,"Copy sisu markup file to output directory","#{@opt.fns} -> #{@output_path}").warn if @opt.cmd =~/[MVv]/ + end mkdir_p("#{@env.path.output}/src") unless FileTest.directory?("#{@env.path.output}/src") mkdir_p(@output_path) unless FileTest.directory?(@output_path) if FileTest.directory?(@output_path) @@ -86,8 +88,9 @@ module SiSU_Markup end end else - tell=SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fns} -> #{@output_path}") - tell.warn unless @opt.cmd =~/q/ + unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,"Output directory does not exist","#{@opt.fns} -> #{@output_path}").warn if @opt.cmd =~/[MVv]/ + end exit end end |