HCoop
/
hcoop
/
domtool2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Factor error message generation into a separate file; add '-tc' flag to domtool-client
[hcoop/domtool2.git]
/
src
/
main-client.sml
diff --git
a/src/main-client.sml
b/src/main-client.sml
index
29db1b4
..
f0a6f69
100644
(file)
--- a/
src/main-client.sml
+++ b/
src/main-client.sml
@@
-27,13
+27,18
@@
fun domtoolRoot () =
file = "domtool"}
end
file = "domtool"}
end
-val
_
=
+val
(doit, args)
=
case CommandLine.arguments () of
case CommandLine.arguments () of
+ "-tc" :: args => (fn fname => (Main.setupUser (); ignore (Main.check fname)), args)
+ | args => (Main.request, args)
+
+val _ =
+ case args of
[fname] =>
if Posix.FileSys.access (fname, []) then
[fname] =>
if Posix.FileSys.access (fname, []) then
-
Main.reques
t fname
+
doi
t fname
else
else
-
Main.reques
t (OS.Path.joinDirFile {dir = domtoolRoot (),
-
file = fname})
+
doi
t (OS.Path.joinDirFile {dir = domtoolRoot (),
+ file = fname})
| [] => Main.requestDir (domtoolRoot ())
| _ => print "Invalid command-line arguments\n"
| [] => Main.requestDir (domtoolRoot ())
| _ => print "Invalid command-line arguments\n"