pkgs.clan: init barebones version
This commit is contained in:
24
pkgs/clan-cli/clan.py
Executable file
24
pkgs/clan-cli/clan.py
Executable file
@@ -0,0 +1,24 @@
|
||||
# !/usr/bin/env python3
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def showhelp():
|
||||
print('''
|
||||
usage:
|
||||
clan admin ...
|
||||
clan join ...
|
||||
clan delete ...
|
||||
''')
|
||||
|
||||
|
||||
try:
|
||||
cmd = f'clan-{sys.argv[1]}'
|
||||
except: # noqa
|
||||
showhelp()
|
||||
|
||||
try:
|
||||
subprocess.Popen([cmd] + sys.argv[2:])
|
||||
except FileNotFoundError:
|
||||
print(f'command {cmd} not found')
|
||||
exit(2)
|
||||
Reference in New Issue
Block a user