X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=scripts%2Fdl_cleanup.py;h=2d6895e460a7b1290675e7ff8f9162e301efe74e;hb=a4fb8e9890d252d7616547d04890be71d0090f99;hp=81c69f7aa512ff893ac0fb17dcac9cb42d38d015;hpb=3a333a2f4cfbfa13a21776a0aeda9567f381fc8a;p=openwrt.git diff --git a/scripts/dl_cleanup.py b/scripts/dl_cleanup.py index 81c69f7aa5..2d6895e460 100755 --- a/scripts/dl_cleanup.py +++ b/scripts/dl_cleanup.py @@ -3,7 +3,8 @@ # OpenWRT download directory cleanup utility. # Delete all but the very last version of the program tarballs. # -# Copyright (c) 2010 Michael Buesch +# Copyright (C) 2010 Michael Buesch +# Copyright (C) 2013 OpenWrt.org """ import sys @@ -75,17 +76,20 @@ def parseVer_GIT(match, filepath): extensions = ( ".tar.gz", ".tar.bz2", + ".tar.xz", ".orig.tar.gz", ".orig.tar.bz2", + ".orig.tar.xz", ".zip", ".tgz", ".tbz", + ".txz", ) 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