some work on enzyme, portageTools and equo
git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@456 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
Vendored
+18
-17
@@ -27,10 +27,6 @@ import sys
|
||||
import string
|
||||
|
||||
sys.path.append('../libraries')
|
||||
import entropyTools
|
||||
import activatorTools
|
||||
from entropyConstants import *
|
||||
from serverConstants import *
|
||||
from outputTools import *
|
||||
|
||||
# CONSTANTS
|
||||
@@ -62,6 +58,23 @@ def print_help():
|
||||
|
||||
options = sys.argv[1:]
|
||||
|
||||
# print version
|
||||
if (string.join(options).find("--version") != -1) or (string.join(options).find(" -V") != -1):
|
||||
print_generic(APPNAME+": "+APPVERSION)
|
||||
sys.exit(0)
|
||||
|
||||
# print help
|
||||
if len(options) < 1 or string.join(options).find("--help") != -1 or string.join(options).find(" -h") != -1:
|
||||
print_help()
|
||||
if len(options) < 1:
|
||||
print_error("not enough parameters")
|
||||
sys.exit(1)
|
||||
|
||||
import entropyTools
|
||||
import activatorTools
|
||||
from entropyConstants import *
|
||||
from serverConstants import *
|
||||
|
||||
# preliminary options parsing
|
||||
_options = []
|
||||
for opt in options:
|
||||
@@ -73,20 +86,8 @@ for opt in options:
|
||||
_options.append(opt)
|
||||
options = _options
|
||||
|
||||
# print version
|
||||
if (string.join(options).find("--version") != -1) or (string.join(options).find(" -V") != -1):
|
||||
entropyTools.print_generic(APPNAME+": "+APPVERSION)
|
||||
sys.exit(0)
|
||||
|
||||
# print help
|
||||
if len(options) < 1 or string.join(options).find("--help") != -1 or string.join(options).find(" -h") != -1:
|
||||
print_help()
|
||||
if len(options) < 1:
|
||||
entropyTools.print_error("not enough parameters")
|
||||
sys.exit(1)
|
||||
|
||||
if (not entropyTools.isRoot()):
|
||||
entropyTools.print_error("you must be root in order to run "+APPNAME)
|
||||
print_error("you must be root in order to run "+APPNAME)
|
||||
sys.exit(2)
|
||||
|
||||
# sync mirrors tool
|
||||
|
||||
+18
-17
@@ -27,10 +27,6 @@ import sys
|
||||
import string
|
||||
|
||||
sys.path.append('../libraries')
|
||||
import entropyTools
|
||||
import enzymeTools
|
||||
from entropyConstants import *
|
||||
from serverConstants import *
|
||||
from outputTools import *
|
||||
|
||||
# CONSTANTS
|
||||
@@ -90,6 +86,23 @@ def print_help():
|
||||
|
||||
options = sys.argv[1:]
|
||||
|
||||
# print version
|
||||
if (string.join(options).find("--version") != -1) or (string.join(options).find(" -V") != -1):
|
||||
print_generic(APPNAME+": "+APPVERSION)
|
||||
sys.exit(0)
|
||||
|
||||
# print help
|
||||
if len(options) < 1 or string.join(options).find("--help") != -1 or string.join(options).find(" -h") != -1:
|
||||
print_help()
|
||||
if len(options) < 1:
|
||||
print_error("not enough parameters")
|
||||
sys.exit(1)
|
||||
|
||||
import entropyTools
|
||||
import enzymeTools
|
||||
from entropyConstants import *
|
||||
from serverConstants import *
|
||||
|
||||
# preliminary options parsing
|
||||
_options = []
|
||||
for opt in options:
|
||||
@@ -101,20 +114,8 @@ for opt in options:
|
||||
_options.append(opt)
|
||||
options = _options
|
||||
|
||||
# print version
|
||||
if (string.join(options).find("--version") != -1) or (string.join(options).find(" -V") != -1):
|
||||
entropyTools.print_generic(APPNAME+": "+APPVERSION)
|
||||
sys.exit(0)
|
||||
|
||||
# print help
|
||||
if len(options) < 1 or string.join(options).find("--help") != -1 or string.join(options).find(" -h") != -1:
|
||||
print_help()
|
||||
if len(options) < 1:
|
||||
entropyTools.print_error("not enough parameters")
|
||||
sys.exit(1)
|
||||
|
||||
if (not entropyTools.isRoot()):
|
||||
entropyTools.print_error("you must be root in order to run "+APPNAME)
|
||||
print_error("you must be root in order to run "+APPNAME)
|
||||
sys.exit(2)
|
||||
|
||||
# world tool
|
||||
|
||||
+18
-15
@@ -28,11 +28,6 @@ import sys
|
||||
import string
|
||||
|
||||
sys.path.append('../libraries')
|
||||
import entropyTools
|
||||
import reagentTools
|
||||
import databaseTools
|
||||
from entropyConstants import *
|
||||
from serverConstants import *
|
||||
from outputTools import *
|
||||
|
||||
# CONSTANTS
|
||||
@@ -70,6 +65,24 @@ def print_help():
|
||||
|
||||
options = sys.argv[1:]
|
||||
|
||||
# print version
|
||||
if (string.join(options).find("--version") != -1) or (string.join(options).find(" -V") != -1):
|
||||
print_generic(APPNAME+": "+APPVERSION)
|
||||
sys.exit(0)
|
||||
|
||||
# print help
|
||||
if len(options) < 1 or string.join(options).find("--help") != -1 or string.join(options).find(" -h") != -1:
|
||||
print_help()
|
||||
if len(options) < 1:
|
||||
print_error("not enough parameters")
|
||||
sys.exit(1)
|
||||
|
||||
import entropyTools
|
||||
import reagentTools
|
||||
import databaseTools
|
||||
from entropyConstants import *
|
||||
from serverConstants import *
|
||||
|
||||
# preliminary options parsing
|
||||
_options = []
|
||||
for opt in options:
|
||||
@@ -81,17 +94,7 @@ for opt in options:
|
||||
_options.append(opt)
|
||||
options = _options
|
||||
|
||||
# print version
|
||||
if (string.join(options).find("--version") != -1) or (string.join(options).find(" -V") != -1):
|
||||
entropyTools.print_generic(APPNAME+": "+APPVERSION)
|
||||
sys.exit(0)
|
||||
|
||||
# print help
|
||||
if len(options) < 1 or string.join(options).find("--help") != -1 or string.join(options).find(" -h") != -1:
|
||||
print_help()
|
||||
if len(options) < 1:
|
||||
entropyTools.print_error("not enough parameters")
|
||||
sys.exit(1)
|
||||
|
||||
if (not entropyTools.isRoot()):
|
||||
print_error("you must be root in order to run "+APPNAME)
|
||||
|
||||
Reference in New Issue
Block a user