hide some unused commands, disable install_update

This commit is contained in:
j 2016-01-13 11:35:43 +05:30
parent e047ccf116
commit 768df8dc7c
1 changed files with 5 additions and 4 deletions

View File

@ -13,6 +13,8 @@ from utils import run, get
root_dir = dirname(settings.base_dir) root_dir = dirname(settings.base_dir)
HIDDEN = ['install_update', 'install_launcher', 'uninstall_launcher']
def r(*cmd): def r(*cmd):
print(' '.join(cmd)) print(' '.join(cmd))
return subprocess.call(cmd) return subprocess.call(cmd)
@ -73,10 +75,7 @@ def command_install_update(*args):
""" """
Install available updates Install available updates
""" """
import update pass
if not update.install():
print("UPDATE FAILED")
sys.exit(1)
def command_update(*args): def command_update(*args):
""" """
@ -267,6 +266,8 @@ def main():
print("usage: ./ctl [action]") print("usage: ./ctl [action]")
indent = max([len(command) for command in commands]) + 4 indent = max([len(command) for command in commands]) + 4
for command in sorted(commands): for command in sorted(commands):
if command in HIDDEN:
continue
space = ' ' * (indent - len(command)) space = ' ' * (indent - len(command))
info = actions["command_%s"%command].__doc__.split('\n') info = actions["command_%s"%command].__doc__.split('\n')
info = [' %s%s' % (' ' * indent, i.strip()) for i in info] info = [' %s%s' % (' ' * indent, i.strip()) for i in info]