From 3fd81b2fa45a6861188acaec0062be85b60aa332 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 18 May 2008 18:51:21 +0300 Subject: Added -v|--verbose option. --- do-until | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/do-until b/do-until index 6903102..a83c70f 100755 --- a/do-until +++ b/do-until @@ -15,6 +15,8 @@ import time def do_until(options, argv): while True: + if options.verbose: + sys.stderr.write("do-until: executing: %s\n" % " ".join(argv)) if options.no_act: sys.stderr.write("do-until: not running command, pretending it " "works anyway\n") @@ -34,6 +36,8 @@ def parse_args(args): parser.add_option("-n", "--no-act", action="store_true", help="Do not run command, just pretend to do it, and " "pretend that it succeeds.") + parser.add_option("-v", "--verbose", action="store_true", + help="Print command before executing it.") options, argv = parser.parse_args(args) -- cgit v1.2.1