source: trunk/server/fedora/support/deploy.py @ 2499

Last change on this file since 2499 was 51, checked in by presbrey, 17 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
3Copyright (C) 2006, Joe Presbrey <presbrey@mit.edu>
4"""
5
6import sys,os,os.path as path
7import string
8import getopt
9
10class Usage(Exception):
11        def __init__(self, msg):
12                self.msg = msg
13
14def 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
32if __name__ == "__main__":
33        sys.exit(main())
Note: See TracBrowser for help on using the repository browser.