2ec68d6d4ec874dc8e91da191e2a3fdba20f5782
[monkeysphere.git] / website / bugs / use_getopts_instead_of_getopt.mdwn
1 Since Monkeysphere is using bash, it would be nice to use the shell
2 build in getopts function, instead of the external getopt program.
3 This would reduce an external dependency, which would definitely be
4 better for portability.
5
6 ---
7
8 So it looks like the sh built-in getopts does not include long options
9 (eg. "--expire").  Is it worth getting rid of the long options for
10 this?
11
12 ---
13
14 Why not just get rid of getopts altogether and perform a simple
15 argument-processing loop with bash string tests?  We're only invoking
16 getopt in three places, and each invocation is no more complex than
17 three arguments -- and most arguments take a separate parameter, which
18 means that handling tricky arg blobs like -aCxr are not gonna be
19 supported anyway.