forked from billy3321/lazyscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lzs
executable file
·38 lines (35 loc) · 1.06 KB
/
lzs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
# -*- encoding=utf8 -*-
## Lazy Script Manage Commander
#
# Lazyscript system command-line management program.
#
from os import system
import sys
from lazyscripts.util.detect import run_asroot
def _check_root():
if not run_asroot():
print "please run as root or use slzs command to launch."
sys.exit()
try:
cmder=sys.argv[1]
if 'repo' == cmder.strip():
from lazyscripts.repo import sign_repopath
action=sys.argv[2]
if 'sign' == action:
origin_path=sys.argv[3]
print sign_repopath(origin_path)
elif 'gui' == cmder:
_check_root()
from ui import GUI
GUI().start()
elif 'list' == cmder:
action=sys.argv[2]
if 'build' == action:
print 'createing scripts list'
from lazyscripts.script import ScriptsList
list = ScriptsList.from_repo(sys.argv[3], local_dir='scriptspoll')
list.path = 'scripts.list'
list.save()
except IndexError:
print 'see more information in this file content.'