build: Fix check-for-missing for srcdir != builddir
This commit is contained in:
parent
faa5c179e8
commit
550715a071
@ -12,12 +12,13 @@ srcdir=sys.argv[1]
|
|||||||
distdir=sys.argv[2]
|
distdir=sys.argv[2]
|
||||||
excludes=sys.argv[3:]
|
excludes=sys.argv[3:]
|
||||||
|
|
||||||
|
cwd=os.getcwd()
|
||||||
os.chdir(srcdir)
|
os.chdir(srcdir)
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
for f in subprocess.Popen(["git", "ls-files"], stdout=subprocess.PIPE).stdout:
|
for f in subprocess.Popen(["git", "ls-files"], stdout=subprocess.PIPE).stdout:
|
||||||
f = f.decode('utf-8').strip()
|
f = f.decode('utf-8').strip()
|
||||||
if (not os.path.exists(os.path.join(distdir, f)) and
|
if (not os.path.exists(os.path.join(cwd, distdir, f)) and
|
||||||
not any((fnmatch.fnmatch(f, p) for p in excludes))):
|
not any((fnmatch.fnmatch(f, p) for p in excludes))):
|
||||||
print("File missing from distribution:", f)
|
print("File missing from distribution:", f)
|
||||||
status=1
|
status=1
|
||||||
|
Loading…
Reference in New Issue
Block a user