# HG changeset patch # User Chris Cannam # Date 1497955564 -3600 # Node ID 1db385567addbdcd8a2e9749346ada934680d0e5 # Parent 05b6e20e25d9d02d8aea1a69952a68137df3a80b# Parent e64981b88943aaf2c57244d0cc0f3169c5237e21 Merge from branch vext diff -r 05b6e20e25d9 -r 1db385567add vext.sml --- a/vext.sml Mon Jun 19 10:14:58 2017 +0100 +++ b/vext.sml Tue Jun 20 11:46:04 2017 +0100 @@ -33,7 +33,7 @@ Software without prior written authorization. *) -val vext_version = "0.0.1" +val vext_version = "0.9.0" datatype vcs = @@ -289,15 +289,19 @@ val tick_cycle = ref 0 val tick_chars = Vector.fromList (map String.str (explode "|/-\\")) - fun tick name = + fun tick libname cmdlist = let val n = Vector.length tick_chars fun pad_to n str = - if n <= String.size str then str - else pad_to n (str ^ " ") + if n <= String.size str then str + else pad_to n (str ^ " ") + val name = if libname <> "" then libname + else if cmdlist = nil then "" + else hd (rev cmdlist) in - print ("\r " ^ + print (" " ^ Vector.sub(tick_chars, !tick_cycle) ^ " " ^ - pad_to 24 name); + pad_to 24 name ^ + "\r"); tick_cycle := (if !tick_cycle = n - 1 then 0 else 1 + !tick_cycle) end @@ -308,7 +312,7 @@ val _ = if verbose () then print ("Running: " ^ cmd ^ " (in dir " ^ dir ^ ")...\n") - else tick libname + else tick libname cmdlist val _ = FileSys.chDir dir val status = case redirect of NONE => Process.system cmd @@ -1629,8 +1633,8 @@ ^ "Usage:\n\n" ^ " vext \n\n" ^ "where is one of:\n\n" + ^ " status print quick report on local status only, without using network\n" ^ " review check configured libraries against their providers, and report\n" - ^ " status print quick report on local status only, without using network\n" ^ " install update configured libraries according to project specs and lock file\n" ^ " update update configured libraries and lock file according to project specs\n" ^ " version print the Vext version number and exit\n\n");