diff options
-rwxr-xr-x | scripts/gen-lockedsig-cache | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache index de8a20c787..49de74ed9b 100755 --- a/scripts/gen-lockedsig-cache +++ b/scripts/gen-lockedsig-cache | |||
@@ -57,13 +57,14 @@ for f in files: | |||
57 | destdir = os.path.dirname(dst) | 57 | destdir = os.path.dirname(dst) |
58 | mkdir(destdir) | 58 | mkdir(destdir) |
59 | 59 | ||
60 | src = os.path.realpath(f) | ||
60 | if os.path.exists(dst): | 61 | if os.path.exists(dst): |
61 | os.remove(dst) | 62 | os.remove(dst) |
62 | if (os.stat(f).st_dev == os.stat(destdir).st_dev): | 63 | if (os.stat(src).st_dev == os.stat(destdir).st_dev): |
63 | print('linking') | 64 | print('linking') |
64 | os.link(f, dst) | 65 | os.link(src, dst) |
65 | else: | 66 | else: |
66 | print('copying') | 67 | print('copying') |
67 | shutil.copyfile(f, dst) | 68 | shutil.copyfile(src, dst) |
68 | 69 | ||
69 | print('Done!') | 70 | print('Done!') |