Commit 2a0d9071 authored by AlmAck's avatar AlmAck
Browse files

bug fix, remove extra chars inside the version number (like 2p2 on...

bug fix, remove extra chars inside the version number (like 2p2 on openssh-6.2p2-2-x86_64.pkg.tar.xz)
fix wrong identation
parent de05ceea
......@@ -32,6 +32,10 @@ def isMoreRecent(pkg1, pkg2):
vl1 = version1.split(".")
vl2 = version2.split(".")
# remove any remaining chars in the name
vl1 = filter(lambda x: x.isdigit(), vl1)
vl2 = filter(lambda x: x.isdigit(), vl2)
i1 = 0
i2 = 0
......@@ -105,17 +109,18 @@ def printDups(dups):
for name in dups:
fileList = dups[name]
for f in fileList[1:]:
print f + " (newest is " + fileList[0] + ")"
def removeDups(dups, path):
for name in dups:
fileList = dups[name]
for f in fileList[1:]:
completePath = path + "/" + f
os.remove(completePath)
print f + " (newest is " + fileList[0] + ")"
print ":: Files removed successfully"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment