aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-07-07 01:17:39 -0400
committerRalph Amissah <ralph@amissah.com>2014-07-07 01:36:20 -0400
commit58c41f6854255a171e55c7308fb75aa260dbf92c (patch)
tree0d7c612ed852443d0b272edbdea784e3fa5d30c7
parentbin/sisu, some cosmetic long line breaking (diff)
bin/sisu, processing dir related
* e.g. using live-manual/manual as sample, the following should work as expected available: ca de en es fr it ja pl pt_BR ro; select: en & ja: sisu --html -v en/live-manual.ssm ja/live-manual.ssm or for all available translations: sisu --html -v **/live-manual.ssm (these previously would have broken after processing the first directory) sisu command equivalent for all available translations being (unaffected): sisu --html -v --glob live-manual
-rw-r--r--bin/sisu45
-rw-r--r--data/doc/sisu/CHANGELOG_v512
-rw-r--r--data/doc/sisu/CHANGELOG_v612
3 files changed, 48 insertions, 21 deletions
diff --git a/bin/sisu b/bin/sisu
index e6a7645a..51840e07 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -222,28 +222,35 @@ class Orient
end
def control
require "#{sisu_is[:path_lib]}/hub"
- if get_processing_info.processing_files. length > 0
+ sisu_called_from_directory
+ if get_processing_info.processing_files.length > 0
get_processing_info.processing_files.each_pair do |markup_dir,markup_file|
- $sisu_document_markup_directory=markup_dir.gsub(/\/$/,'')
- argv_sub=get_processing_info.command_line_modifiers + markup_file
- if FileTest.directory?(markup_dir)
- system("cd #{markup_dir}")
- Dir.chdir(markup_dir)
- $sisu_document_markup_directory_base_fixed_path=Dir.pwd.gsub(/\/(?:#{language_list.regex})$/,'')
- SiSU::HubMaster.new(argv_sub)
- elsif markup_dir =~/https?:/
- markup_file.each do |mf|
- (FileTest.file?(mf)) \
- ? (puts 'requested remote file already exists in current directory ' + Dir.pwd + ' using ' + mf)
- : (system("wget #{markup_dir}/#{mf}"))
+ begin
+ $sisu_document_markup_directory=markup_dir.gsub(/\/$/,'')
+ argv_sub=get_processing_info.command_line_modifiers + markup_file
+ if FileTest.directory?(markup_dir)
+ system("cd #{markup_dir}")
+ Dir.chdir(markup_dir)
+ $sisu_document_markup_directory_base_fixed_path=
+ Dir.pwd.gsub(/\/(?:#{language_list.regex})$/,'')
+ SiSU::HubMaster.new(argv_sub)
+ elsif markup_dir =~/https?:/
+ markup_file.each do |mf|
+ (FileTest.file?(mf)) \
+ ? (puts 'requested remote file already exists in current directory ' \
+ + Dir.pwd + ' using ' + mf)
+ : (system("wget #{markup_dir}/#{mf}"))
+ end
+ $sisu_document_markup_directory_base_fixed_path=
+ Dir.pwd.gsub(/\/(?:#{language_list.regex})$/,'')
+ argv_sub=command_line_modifiers + markup_file
+ SiSU::HubMaster.new(argv_sub)
+ else p "Error directory specified #{markup_dir} not found"
end
- $sisu_document_markup_directory_base_fixed_path=Dir.pwd.gsub(/\/(?:#{language_list.regex})$/,'')
- argv_sub=command_line_modifiers + markup_file
- SiSU::HubMaster.new(argv_sub)
- else p "Error directory specified #{markup_dir} not found"
+ ensure
+ Dir.chdir(sisu_called_from_directory)
+ system("cd #{sisu_called_from_directory}")
end
- Dir.chdir(sisu_called_from_directory)
- system("cd #{sisu_called_from_directory}")
end
else
$sisu_document_markup_directory=Dir.pwd.gsub(/\/$/,'')
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index befa92fb..3a994672 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -38,7 +38,17 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.4.5.orig.tar.xz
sisu_5.4.5.orig.tar.xz
sisu_5.4.5-1.dsc
-* bin/sisu, some cosmetic long line breaking
+* bin/sisu,
+ * processing dir related
+ e.g. using live-manual/manual as sample, the following should work as
+ expected, available: ca de en es fr it ja pl pt_BR ro; select: en & ja:
+ sisu --html -v en/live-manual.ssm ja/live-manual.ssm
+ or for all available translations:
+ sisu --html -v **/live-manual.ssm
+ (these previously would have broken after processing the first directory)
+ sisu command equivalent for all available translations being (unaffected):
+ sisu --html -v --glob live-manual
+ * some cosmetic long line breaking
%% 5.4.4.orig.tar.xz (2014-07-04:26/5)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_5.4.4
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6
index c29c6f65..ff82853d 100644
--- a/data/doc/sisu/CHANGELOG_v6
+++ b/data/doc/sisu/CHANGELOG_v6
@@ -28,7 +28,17 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.0.11.orig.tar.xz
sisu_6.0.11.orig.tar.xz
sisu_6.0.11-1.dsc
-* bin/sisu, some cosmetic long line breaking
+* bin/sisu,
+ * processing dir related
+ e.g. using live-manual/manual as sample, the following should work as
+ expected, available: ca de en es fr it ja pl pt_BR ro; select: en & ja:
+ sisu --html -v en/live-manual.ssm ja/live-manual.ssm
+ or for all available translations:
+ sisu --html -v **/live-manual.ssm
+ (these previously would have broken after processing the first directory)
+ sisu command equivalent for all available translations being (unaffected):
+ sisu --html -v --glob live-manual
+ * some cosmetic long line breaking
%% 6.0.10.orig.tar.xz (2014-07-04:26/5)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_6.0.10