]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Also adapt make-ext-symlinks.py script 10506/head
authorOtto <otto.moerbeek@open-xchange.com>
Fri, 18 Jun 2021 12:18:25 +0000 (14:18 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 18 Jun 2021 12:18:25 +0000 (14:18 +0200)
pdns/recursordist/make-ext-symlinks.py

index f0ee8a02b77454a63b8ea921c134978987dc0ad8..492233a46cabf6589802278cdb7e88f38966e957 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
 
 import os
 import shutil
@@ -20,5 +20,7 @@ for extdir in ['yahttp', 'json11', 'probds']:
         os.mkdir(stripped_root)
         num_dirs = len(root.split('/')) - root.split('/').count('..')
         for dirfile in files:
-            os.symlink(os.path.join(num_dirs * '../', root, dirfile),
-                       os.path.join(stripped_root, dirfile))
+            if dirfile == '.gitignore':
+                shutil.copyfile(os.path.join(num_dirs * '../', stripped_root, dirfile), os.path.join(stripped_root, dirfile))
+            else:
+                os.symlink(os.path.join(num_dirs * '../', root, dirfile), os.path.join(stripped_root, dirfile))