[28151] in Source-Commits
get_message commit: Support ancient long arguments; bump to 10.1.1
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Apr 10 13:32:18 2014
Date: Thu, 10 Apr 2014 13:31:59 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201404101731.s3AHVxNP020146@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/get_message/commit/e4a6814cdea59dea82f2eee5f2d39da6e83b1e93
commit e4a6814cdea59dea82f2eee5f2d39da6e83b1e93
Author: Jonathan Reed <jdreed@mit.edu>
Date: Thu Apr 10 11:24:27 2014 -0400
Support ancient long arguments; bump to 10.1.1
Because it was a good idea in 1980-something, get_message
is in lots of places with non-GNU-style long arguments. Include
a dumb hack to support these.
Also, support the -z argument, while noting that it's deprecated.
Release this as 10.1.1
get_message | 10 +++++++++-
setup.py | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/get_message b/get_message
index ac6d9b6..e0892da 100755
--- a/get_message
+++ b/get_message
@@ -92,7 +92,15 @@ def main():
parser = OptionParser()
parser.add_option("-n", action="store_true", dest="new", default=False)
parser.add_option("-l", action="store_true", dest="login", default=False)
- options, args = parser.parse_args()
+ parser.add_option("-z", action="store_true", dest="zephyr", default=False)
+ # This is why we can't have nice things
+ old_args = { '-new': '-n',
+ '-login': '-l',
+ '-zephyr': '-z' }
+ options, args = parser.parse_args(
+ [old_args.get(x, x) for x in sys.argv[1:]])
+ if options.zephyr:
+ print >>sys.stderr, "get_message: The -z/-zephyr option is deprecated."
version, timestamp, content = get_message()
if options.new and has_seen(timestamp):
# This is an already-seen message, and new-only was requested.
diff --git a/setup.py b/setup.py
index d71c357..886d110 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
from distutils.core import setup
setup(name='get_message',
- version='10.1',
+ version='10.1.1',
description='Athena utility for getting the global message of the day',
author='Alexander Chernyakhovsky',
scripts=['get_message']