Improve pubdir parameter reporting
git-svn-id: file:///srv/svn/repo/kosuzu/trunk@27 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
@@ -9,13 +9,13 @@ open Logarion
|
||||
let publish pubdir ids =
|
||||
let kv = Logarion.File_store.of_kv_file () in
|
||||
let predicate t = List.mem t.Text.id ids in
|
||||
let pubdir = match pubdir with Some d -> d | None ->
|
||||
try Logarion.Store.KV.find "Pubdir" kv with Not_found ->
|
||||
try Sys.getenv "txtpubdir" with Not_found -> ""
|
||||
let pubdir_source, pubdir = match pubdir with Some d -> "--pubdir ", d | None ->
|
||||
try "txt.conf:Pubdir", Logarion.Store.KV.find "Pubdir" kv with Not_found ->
|
||||
try "$txtpubdir", Sys.getenv "txtpubdir" with Not_found -> "$txtpubdir", ""
|
||||
in
|
||||
let targets = targets pubdir in
|
||||
if targets = [] then
|
||||
Printf.eprintf "No target directories in $pubdir='%s'\n" pubdir
|
||||
Printf.eprintf "No target directories in %s='%s'\n" pubdir_source pubdir
|
||||
else begin
|
||||
let pub_dirs = List.map (fun x -> snd x) targets in
|
||||
File_store.iter ~predicate (fun (_t, p) ->
|
||||
|
||||
Reference in New Issue
Block a user