Make update.py copy files instead of hardlinking to work around git behaviour.
authorethereal <ethereal@ethv.net>
Fri, 24 Jan 2020 21:32:18 +0000 (16:32 -0500)
committerethereal <ethereal@ethv.net>
Fri, 24 Jan 2020 21:32:32 +0000 (16:32 -0500)
update.py

index 8eccaa2..046d8fd 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -19,6 +19,7 @@ import re
 import hashlib
 import subprocess
 import tempfile
+import shutil
 from functools import reduce
 
 # Parse the YAML from the header of a file if it exists
@@ -351,7 +352,7 @@ def process_file(input_filename, output_filename, navinfo, gen_path):
     output.close()
     inf.close()
 
-# Either link or process_file for each 
+# Either copy or process_file for each 
 def generate(src_path, gen_path, navinfo):
     for (spath, subdirs, files) in os.walk(src_path):
         npath = spath[len(src_path):]
@@ -384,9 +385,9 @@ def generate(src_path, gen_path, navinfo):
                 print("Processing file " + sfp + " to generate " + gfp)
                 process_file(sfp, gfp, c, gen_path)
             else:
-                print("Linking " + sfp + " to " + gfp)
+                print("Copying " + sfp + " to " + gfp)
                 try:
-                    os.link(sfp, gfp)
+                    shutil.copyfile(sfp, gfp)
                 except OSError as e:
                     pass