|
41 | 41 |
|
42 | 42 | setDebugFlags("nogen") /* Don't generate dll/so-files when instantiating classes (performance) */; |
43 | 43 |
|
| 44 | +import shutil |
| 45 | + |
44 | 46 | // rmSymlinks |
45 | 47 | // (false) should we keep readable names (nice online, if the server handles symbolic links), or |
46 | 48 | // (true) use the hashed names in the links (nice if you want a zipped version to work on Windows). This removes the readable names, keeping only the hashed and de-duped images. |
@@ -79,9 +81,10 @@ py:=getInstallationDirectoryPath() + "/share/doc/omc/testmodels/generate_icons.p |
79 | 81 |
|
80 | 82 | // adrpo: do not run the python stuff when running the testsuite |
81 | 83 | if getEnvironmentVar("GenerateDocTest") == "YES" then |
82 | | - system("mkdir -p Icons"); |
| 84 | + if not os.path.exists("Icons"): |
| 85 | + os.mkdir("Icons") |
83 | 86 | else |
84 | | - commands:={"python "+py+" --quiet --output-dir Icons "+typeNameString(cl) for cl in getClassNames(builtin=false)};getErrorString(); |
| 87 | + commands:={"python "+py+" --quiet --output-dir Icons "+typeNameString(cl) for cl in reversed(getClassNames(builtin=false))};getErrorString(); |
85 | 88 | res:=system_parallel(commands);getErrorString(); |
86 | 89 | //system("rm -f *.json");getErrorString(); |
87 | 90 | end if; |
@@ -456,8 +459,11 @@ echo(shouldEcho); |
456 | 459 | system("rm -f tidy.links tidy.out tidy.err tidy.filtered"); |
457 | 460 |
|
458 | 461 | "Copying original HTML files to 'old-html-tmp'"; |
459 | | -system("mkdir -p old-html-tmp"); |
460 | | -system("cp *.html old-html-tmp/"); |
| 462 | +oldtmp = "old-html-tmp" |
| 463 | +if not os.path.exists(oldtmp): |
| 464 | + os.mkdir(oldtmp) |
| 465 | +for file in glob.glob('*.html'): |
| 466 | + shutil.copy(file, oldtmp) |
461 | 467 |
|
462 | 468 | "Tidy.py"; |
463 | 469 | system("python Tidy.py 2> tidy.err"); |
@@ -499,7 +505,8 @@ def makeCaseSensitive(): |
499 | 505 | print('Renaming file %s to %s' % (file,nfile)) |
500 | 506 | if os.path.isfile(nfile): |
501 | 507 | raise Exception('File already exists: ' + nfile) |
502 | | - call(['sed','-i','s/%s/%s/g' % (file,nfile)] + files) |
| 508 | + for f in getFiles(): |
| 509 | + call(['sed','-i','s/%s/%s/g' % (file,nfile)] + f) |
503 | 510 | os.rename(file,nfile) |
504 | 511 | return False |
505 | 512 | visited[upper] = file |
|
0 commit comments