X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=scripts%2Fdl_cleanup.py;h=c2bbbc25bb5d7b35335ae0871edac76332c0482d;hp=e5cd52c80623689462b41bf855c398c9f8290cea;hb=ec075491a1e23f88f036bddd43522eaf784f94e2;hpb=fda14f8c09f19dc4eb941cf2f4559dee7242f8e3 diff --git a/scripts/dl_cleanup.py b/scripts/dl_cleanup.py index e5cd52c806..c2bbbc25bb 100755 --- a/scripts/dl_cleanup.py +++ b/scripts/dl_cleanup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python """ -# OpenWRT download directory cleanup utility. +# OpenWrt download directory cleanup utility. # Delete all but the very last version of the program tarballs. # # Copyright (C) 2010 Michael Buesch @@ -87,9 +87,9 @@ extensions = ( ) versionRegex = ( - (re.compile(r"(.+)[-_]([0-9a-fA-F]{40,40})"), parseVer_GIT), # xxx-GIT_SHASUM (re.compile(r"(.+)[-_](\d+)\.(\d+)\.(\d+)\.(\d+)"), parseVer_1234), # xxx-1.2.3.4 (re.compile(r"(.+)[-_](\d\d\d\d)-?(\d\d)-?(\d\d)"), parseVer_ymd), # xxx-YYYY-MM-DD + (re.compile(r"(.+)[-_]([0-9a-fA-F]{40,40})"), parseVer_GIT), # xxx-GIT_SHASUM (re.compile(r"(.+)[-_](\d+)\.(\d+)\.(\d+)(\w?)"), parseVer_123), # xxx-1.2.3a (re.compile(r"(.+)[-_](\d+)_(\d+)_(\d+)"), parseVer_123), # xxx-1_2_3 (re.compile(r"(.+)[-_](\d+)\.(\d+)(\w?)"), parseVer_12), # xxx-1.2a @@ -146,7 +146,7 @@ class Entry: return self.version >= y.version def usage(): - print "OpenWRT download directory cleanup utility" + print "OpenWrt download directory cleanup utility" print "Usage: " + sys.argv[0] + " [OPTIONS] " print "" print " -d|--dry-run Do a dry-run. Don't delete any files"