]> git.donarmstrong.com Git - lilypond.git/commitdiff
Build: Check if link exists, not if linked file exists.
authorJulien Rioux <jrioux@physics.utoronto.ca>
Thu, 19 Jan 2012 14:52:13 +0000 (09:52 -0500)
committerJulien Rioux <jrioux@physics.utoronto.ca>
Sun, 22 Jan 2012 19:28:20 +0000 (14:28 -0500)
python/auxiliar/postprocess_html.py
scripts/build/website_post.py
scripts/build/www_post.py

index ba6d43e09f075bc033a5fa017f93d19878fa9c39..42ccdbe54114d6febe319ab73366434f2ed137ef 100644 (file)
@@ -381,5 +381,5 @@ def process_html_files (package_name = '',
                     out_f.write (page_flavors[k][1])
                     out_f.close()
         # if the page is translated, a .en.html symlink is necessary for content negotiation
-        if target == 'online' and ext_list != ['']:
+        if target == 'online' and ext_list != [''] and not os.path.lexists (name_filter (prefix + '.en.html')):
             os.symlink (os.path.basename (prefix) + '.html', name_filter (prefix + '.en.html'))
index 7e8ffefbd624a59510fbf0d5cc49d8c5df52105f..129c1217d325ecfc148eafac80f20e3590fdb9e6 100644 (file)
@@ -153,7 +153,7 @@ for file in html_files:
         lang = ''
         # possibly necessary for automatic language selection
         file_symlink = file.replace(".html", ".en.html")
-        if (not (os.path.exists(file_symlink))):
+        if not os.path.lexists (file_symlink):
             os.symlink (file, file_symlink)
     elif (len(file_split) == 3):
         # it's a translation
index 7ec91dd80bc27bb2bff6c41c90aba3247af916a5..784a978f20dafc9ffbaa22488caaf1b7451fbf2f 100644 (file)
@@ -82,7 +82,7 @@ for t in targets:
     for l in symlinks:
         p = mirrortree.new_link_path (os.path.normpath (os.readlink (l)), os.path.dirname (l), strip_re)
         dest = strip_file_name[t] (l)
-        if not os.path.exists (dest):
+        if not os.path.lexists (dest):
             os.symlink (p, dest)