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: