* put usage fun to util
This commit is contained in:
+1
-6
@@ -8,11 +8,6 @@ import pisiconfig
|
|||||||
import util
|
import util
|
||||||
from pisibuild import PisiBuild
|
from pisibuild import PisiBuild
|
||||||
|
|
||||||
def usage(progname = "pisi-build"):
|
|
||||||
print """
|
|
||||||
Usage:
|
|
||||||
%s [options] package-name.pspec
|
|
||||||
""" %(progname)
|
|
||||||
|
|
||||||
def doProgress(filename, percent, rate):
|
def doProgress(filename, percent, rate):
|
||||||
out = '\r%-30.30s %%%3d %d KB/s' % (filename, percent, rate)
|
out = '\r%-30.30s %%%3d %d KB/s' % (filename, percent, rate)
|
||||||
@@ -23,7 +18,7 @@ def main():
|
|||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
# wrapper for usage(progname) function
|
# wrapper for usage(progname) function
|
||||||
help = lambda: usage(sys.argv[0])
|
help = lambda: util.usage(sys.argv[0])
|
||||||
|
|
||||||
# getopt magic
|
# getopt magic
|
||||||
try:
|
try:
|
||||||
|
|||||||
+1
-7
@@ -4,18 +4,12 @@
|
|||||||
import install
|
import install
|
||||||
import util
|
import util
|
||||||
|
|
||||||
def usage(progname = "pisi-install"):
|
|
||||||
print """
|
|
||||||
Usage:
|
|
||||||
%s [options] package-name.pspec
|
|
||||||
""" %(progname)
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import sys
|
import sys
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
# wrapper for usage(progname) function
|
# wrapper for usage(progname) function
|
||||||
help = lambda: usage(sys.argv[0])
|
help = lambda: util.usage(sys.argv[0])
|
||||||
|
|
||||||
# getopt magic
|
# getopt magic
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -42,3 +42,9 @@ def strlist(l):
|
|||||||
|
|
||||||
class ArgError(Exception):
|
class ArgError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def usage(progname = "pisi-build"):
|
||||||
|
print """
|
||||||
|
Usage:
|
||||||
|
%s [options] package-name.pspec
|
||||||
|
""" %(progname)
|
||||||
|
|||||||
Reference in New Issue
Block a user