From: Otto Date: Fri, 18 Jun 2021 12:18:25 +0000 (+0200) Subject: Also adapt make-ext-symlinks.py script X-Git-Tag: dnsdist-1.7.0-alpha1~129^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10506%2Fhead;p=thirdparty%2Fpdns.git Also adapt make-ext-symlinks.py script --- diff --git a/pdns/recursordist/make-ext-symlinks.py b/pdns/recursordist/make-ext-symlinks.py index f0ee8a02b7..492233a46c 100755 --- a/pdns/recursordist/make-ext-symlinks.py +++ b/pdns/recursordist/make-ext-symlinks.py @@ -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))