Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 7e237d3

Browse files
hkielOpenModelica-Hudson
authored andcommitted
fix GenerateDoc.mos
Belonging to [master]: - #2752
1 parent ad7bdaf commit 7e237d3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Examples/GenerateDoc.mos

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141

4242
setDebugFlags("nogen") /* Don't generate dll/so-files when instantiating classes (performance) */;
4343

44-
import shutil
45-
4644
// rmSymlinks
4745
// (false) should we keep readable names (nice online, if the server handles symbolic links), or
4846
// (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.
@@ -81,10 +79,9 @@ py:=getInstallationDirectoryPath() + "/share/doc/omc/testmodels/generate_icons.p
8179

8280
// adrpo: do not run the python stuff when running the testsuite
8381
if getEnvironmentVar("GenerateDocTest") == "YES" then
84-
if not os.path.exists("Icons"):
85-
os.mkdir("Icons")
82+
system("mkdir -p Icons");
8683
else
87-
commands:={"python "+py+" --quiet --output-dir Icons "+typeNameString(cl) for cl in reversed(getClassNames(builtin=false))};getErrorString();
84+
commands:={"python "+py+" --quiet --output-dir Icons "+typeNameString(cl) for cl in getClassNames(builtin=false)};getErrorString();
8885
res:=system_parallel(commands);getErrorString();
8986
//system("rm -f *.json");getErrorString();
9087
end if;
@@ -459,11 +456,15 @@ echo(shouldEcho);
459456
system("rm -f tidy.links tidy.out tidy.err tidy.filtered");
460457

461458
"Copying original HTML files to 'old-html-tmp'";
462-
oldtmp = "old-html-tmp"
459+
writeFile("copyold.py","#!/usr/bin/env python
460+
import shutil
461+
oldtmp = 'old-html-tmp'
463462
if not os.path.exists(oldtmp):
464463
os.mkdir(oldtmp)
465464
for file in glob.glob('*.html'):
466465
shutil.copy(file, oldtmp)
466+
");
467+
system("python copyold.py");
467468

468469
"Tidy.py";
469470
system("python Tidy.py 2> tidy.err");

0 commit comments

Comments
 (0)