From c8779d0322069c79bba79b8372afdc1745871cfa Mon Sep 17 00:00:00 2001 From: Yuta Date: Sun, 17 Apr 2011 10:48:26 +0900 Subject: [PATCH] added -f option to update command --- pythonbrew/commands/update.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pythonbrew/commands/update.py b/pythonbrew/commands/update.py index 1fbaca0..3313f83 100644 --- a/pythonbrew/commands/update.py +++ b/pythonbrew/commands/update.py @@ -11,7 +11,7 @@ from pythonbrew.util import rm_r, unpack_downloadfile, Link, is_gzip, Subprocess class UpdateCommand(Command): name = "update" usage = "%prog" - summary = "Update pythonbrew to the latest version" + summary = "Update the pythonbrew to the latest version" def __init__(self): super(UpdateCommand, self).__init__() @@ -20,7 +20,7 @@ class UpdateCommand(Command): dest='head', action='store_true', default=False, - help='Update pythonbrew to the github version' + help='Update the pythonbrew to the github version' ) self.parser.add_option( '--config', @@ -29,6 +29,13 @@ class UpdateCommand(Command): default=False, help='Update config.cfg' ) + self.parser.add_option( + '-f', '--force', + dest='force', + action='store_true', + default=False, + help='Force update the pythonbrew' + ) def run_command(self, options, args): if options.config: @@ -60,7 +67,7 @@ class UpdateCommand(Command): else: version = get_stable_version() # check for version - if version <= VERSION: + if not options.force and version <= VERSION: logger.info("You are already running the installed latest version of pythonbrew.") return