Last change
on this file since 2402 was
51,
checked in by presbrey, 18 years ago
|
some fedora setup scripts
|
-
Property svn:executable set to
*
|
File size:
660 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | """scripts.mit.edu deployment sychronization support |
---|
3 | Copyright (C) 2006, Joe Presbrey <presbrey@mit.edu> |
---|
4 | """ |
---|
5 | |
---|
6 | import sys,os,os.path as path |
---|
7 | import string |
---|
8 | import getopt |
---|
9 | |
---|
10 | class Usage(Exception): |
---|
11 | def __init__(self, msg): |
---|
12 | self.msg = msg |
---|
13 | |
---|
14 | def main(argv=None): |
---|
15 | if argv is None: |
---|
16 | argv = sys.argv |
---|
17 | try: |
---|
18 | try: |
---|
19 | opts, args = getopt.getopt(sys.argv[1:], "h", ["help"]) |
---|
20 | except getopt.error, msg: |
---|
21 | raise Usage(msg) |
---|
22 | except Usage, err: |
---|
23 | print >>sys.stderr, err.msg |
---|
24 | print >>sys.stderr, "for help use --help" |
---|
25 | return 2 |
---|
26 | |
---|
27 | for o, a in opts: |
---|
28 | if o in ("-h", "--help"): |
---|
29 | print __doc__ |
---|
30 | return 0 |
---|
31 | |
---|
32 | if __name__ == "__main__": |
---|
33 | sys.exit(main()) |
---|
Note: See
TracBrowser
for help on using the repository browser.