iste bu da nur topu gibi yeni bir tool
This commit is contained in:
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#! /usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# sys modules
|
||||
import sys
|
||||
from optparse import OptionParser
|
||||
|
||||
#sys.path.append("./lib")
|
||||
from pisi.index import Index
|
||||
import pisi.util
|
||||
from pisi.ui import ui
|
||||
|
||||
class ArgError(Exception):
|
||||
pass
|
||||
|
||||
def main():
|
||||
|
||||
usage = "usage: %prog [options] <package>"
|
||||
parser = OptionParser(usage=usage,version="%prog " + pisi.__version__)
|
||||
parser.add_option("-D", "--destdir", action="store")
|
||||
parser.add_option("-v", "--verbose", action="store_true",
|
||||
dest="verbose", default=False,
|
||||
help="detailed output")
|
||||
parser.add_option("-d", "--debug", action="store_true", default=True)
|
||||
parser.add_option("-n", "--dry-run", action="store_true",
|
||||
default = "do not perform any action, just show what\
|
||||
would be done")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if len(args) != 1:
|
||||
print usage
|
||||
raise ArgError, "pisi-build expects a PISI index file"
|
||||
else:
|
||||
index_file = args[0]
|
||||
|
||||
ui.info('* Updating index from index file: ' + index_file + '\n')
|
||||
|
||||
index = Index()
|
||||
index.read(index_file)
|
||||
index.update_db()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user