Commit 4d214f12 authored by André Anjos's avatar André Anjos 💬

Allow program replacements for a number of SGE utilities

parent b0505580
......@@ -11,11 +11,20 @@ import sys
def main():
if len(sys.argv) < 2:
print __doc__
print "usage: %s <command> [arg [arg ...]]" % \
os.path.basename(sys.argv[0])
sys.exit(1)
from ..setshell import replace
replace('grid', sys.argv[1:])
prog = os.path.basename(sys.argv[0])
if prog[-3:].lower == '.py': prog = prog[-3:]
if prog == 'grid':
# act as before
if len(sys.argv) < 2:
print __doc__
print "usage: %s <command> [arg [arg ...]]" % \
os.path.basename(sys.argv[0])
sys.exit(1)
replace('grid', sys.argv[1:])
else:
# call that specific command on the grid environment
replace('grid', [prog] + sys.argv[1:])
This diff is collapsed.
......@@ -15,8 +15,14 @@ setup(
entry_points={
'console_scripts': [
'jman = gridtk.scripts.jman:main',
'grid = gridtk.scripts.grid:main',
'jman = gridtk.script.jman:main',
'grid = gridtk.script.grid:main',
# program replacements
'qstat = gridtk.script.grid:main',
'qdel = gridtk.script.grid:main',
'qsub = gridtk.script.grid:main',
'man = gridtk.script.grid:main',
]
},
......
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