From 206d7a0e9c1b837f4acbe564722351f44e96ea37 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 22 Feb 2004 00:05:16 +0000 Subject: Sorting lists before use as globbing on Linux does not return sorted. --- src/LexGen.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/LexGen.py b/src/LexGen.py index 1d11e3566..290ba509c 100644 --- a/src/LexGen.py +++ b/src/LexGen.py @@ -142,6 +142,9 @@ def FindModules(lexFile): modules.append(l.split()[1]) return modules +def ciCompare(a,b): + return a.lower() < b.lower() + def RegenerateAll(): root="../../" @@ -152,11 +155,13 @@ def RegenerateAll(): lexerModules = [] for lexFile in lexFilePaths: lexerModules.extend(FindModules(lexFile)) + lexerModules.sort(ciCompare) # Find all the SciTE properties files otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"] propFilePaths = glob.glob(root + "scite/src/*.properties") propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps] + propFiles.sort(ciCompare) print propFiles # Find all the menu command IDs in the SciTE header -- cgit v1.2.3