Commit 4558d23f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d89c0f6a
......@@ -362,8 +362,6 @@ setup(
entry_points= {'console_scripts': [
# start wcfs for zurl
# XXX name -> wcfs_serve? (it is confusing to have 2
# wcfs with different behaviour)
'wcfs = wendelin.wcfs:main',
# demo to test
......
......@@ -345,10 +345,21 @@ def serve(zurl, optv, exec_=False):
# if called as main just -> serve()
# if called as main just -> exec serve()
def _usage(w):
progname = os.path.basename(sys.argv[0])
print("Wcfs serves WCFS filesystem for ZODB at zurl for wendelin.core .\n", file=w)
print("Usage: %s [-h | wcfs.go options] zurl" % progname, file=w)
sys.exit(2)
def main():
argv = sys.argv[1:]
# XXX usage
if len(argv) == 0:
_usage(sys.stderr)
if argv[0] == '-h':
os.execv(_wcfs_exe(), [_wcfs_exe(), '-h'])
zurl = argv[-1] # -a -b zurl -> zurl
optv = argv[:-1] # -a -b zurl -> -a -b
serve(zurl, optv, exec_=True)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment