scripts: handle gcc and linux in dl_cleanup script
Handle gcc and linux with a special regex that set their progname with their major version. This way every minor version can be cleared. The build cleanup logic can be tweaked later to clean the entire toolchain and target dir with a different gcc version. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [reformat commit message] Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
		
				
					committed by
					
						
						Paul Spooren
					
				
			
			
				
	
			
			
			
						parent
						
							366be2183e
						
					
				
				
					commit
					93f488fc37
				
			@@ -109,6 +109,8 @@ extensions = (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
versionRegex = (
 | 
					versionRegex = (
 | 
				
			||||||
 | 
					    (re.compile(r"(gcc[-_]\d+)\.(\d+)\.(\d+)"), parseVer_12),  # gcc.1.2
 | 
				
			||||||
 | 
					    (re.compile(r"(linux[-_]\d+\.\d+)\.(\d+)"), parseVer_r),  # linux.1
 | 
				
			||||||
    (re.compile(r"(.+)[-_](\d+)\.(\d+)\.(\d+)\.(\d+)"), parseVer_1234),  # xxx-1.2.3.4
 | 
					    (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)-"),
 | 
					        re.compile(r"(.+)[-_](\d\d\d\d)-?(\d\d)-?(\d\d)-"),
 | 
				
			||||||
@@ -123,8 +125,6 @@ versionRegex = (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
blacklist = [
 | 
					blacklist = [
 | 
				
			||||||
    ("linux", re.compile(r"linux-\d.*")),
 | 
					 | 
				
			||||||
    ("gcc", re.compile(r"gcc-.*")),
 | 
					 | 
				
			||||||
    ("wl_apsta", re.compile(r"wl_apsta.*")),
 | 
					    ("wl_apsta", re.compile(r"wl_apsta.*")),
 | 
				
			||||||
    (".fw", re.compile(r".*\.fw")),
 | 
					    (".fw", re.compile(r".*\.fw")),
 | 
				
			||||||
    (".arm", re.compile(r".*\.arm")),
 | 
					    (".arm", re.compile(r".*\.arm")),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user