From 863cbe05ca7b5c2ce1c4db7a0fd0df3a81ae66c5 Mon Sep 17 00:00:00 2001 From: Martinez Date: Mon, 20 Nov 2017 23:08:43 +0100 Subject: [PATCH] cave-stat data tuck --- bin/cave-stat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cave-stat b/bin/cave-stat index 4d69e5b..e3d2e58 100755 --- a/bin/cave-stat +++ b/bin/cave-stat @@ -19,6 +19,7 @@ def cave_stat(): if "--x-of-y" in cmdline: position = [c for c in cmdline if " of " in c][0] pos, total, failed = [safe_int(a) for a in re.findall("(\d+) of (\d+)(?:, (\d+) failed)?", position)[0]] + done = pos - 1 if "--destination" in cmdline: action = "Installing" @@ -30,7 +31,7 @@ def cave_stat(): lines = [ "**<.> %s %s<.>" %(action, atom), - " - %s of %s done<.> (%.01f %% remaining)" %(pos, total, 100 - 100 * int(pos) / int(total)) + " - %s of %s done<.> (%.01f %% remaining)" %(done, total, 100 - 100 * int(done) / int(total)) ] if failed: