diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-10-21 18:44:52 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-10-21 18:44:52 -0400 |
commit | d66bb9f256db65e3487dec361a4a5a9d7ee238b0 (patch) | |
tree | 02a7bb0fa4faec1697c91fbc22c46014b3ff49c5 /src/demo.sml | |
parent | d249f18f65213b5a198f39e254982293ecaa0e10 (diff) |
Sql demo
Diffstat (limited to 'src/demo.sml')
-rw-r--r-- | src/demo.sml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/demo.sml b/src/demo.sml index 80506576..5ed9da2a 100644 --- a/src/demo.sml +++ b/src/demo.sml @@ -271,6 +271,15 @@ fun make {prefix, dirname} = fun highlight () = doit (fn (src, html) => let + val dirty = + let + val srcSt = Posix.FileSys.stat src + val htmlSt = Posix.FileSys.stat html + in + Time.> (Posix.FileSys.ST.mtime srcSt, + Posix.FileSys.ST.mtime htmlSt) + end handle OS.SysErr _ => true + val cmd = "emacs --eval \"(progn " ^ "(global-font-lock-mode t) " ^ "(add-to-list 'load-path \\\"" @@ -287,8 +296,11 @@ fun make {prefix, dirname} = ^ "\\\") " ^ "(kill-emacs))\"" in - print (">>> " ^ cmd ^ "\n"); - ignore (OS.Process.system cmd) + if dirty then + (print (">>> " ^ cmd ^ "\n"); + ignore (OS.Process.system cmd)) + else + () end) in if OS.Path.base file = "demo" then |