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/texpdf.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/texpdf.rb')
-rw-r--r-- | lib/sisu/v3/texpdf.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 30775a3a..ab7995f4 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -238,11 +238,15 @@ module SiSU_TeX "#{@md.fnb}.portrait.pdf" else 'portrait.pdf' end - system(" - cd #{@md.file.output_path.pdf.dir} - rm #{mklnk} - ln -s #{pdf_p} #{mklnk} - ") + if FileTest.directory?(@md.file.output_path.pdf.dir) + pwd=Dir.pwd + Dir.chdir(@md.file.output_path.pdf.dir) + system(" + rm #{mklnk} + ln -s #{pdf_p} #{mklnk} + ") + Dir.chdir(pwd) + end end if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{pdf_l}") mklnk=if @md.file.output_dir_structure.by_language_code? \ @@ -308,7 +312,7 @@ module SiSU_TeX rght=@md.rights #.author.dup #dup is necessary, else contents of :rights changed sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,rght.copyright.all) copymark=@md.author_copymark \ - ? '{\begin{small}\copyright\end{small}} ' \ + ? '{\begin{small}\copyright\end{small}} ' : '' copymark='Copyright {\begin{small}\copyright\end{small}} ' copyright=sp_char.special_characters_safe.gsub(/^\s*Copyright \(C\)/, copymark) |