Browse Source

makepak.py: Skip all filenames starting with .

This makes it much simpler to define a buildroot package for xash-extras
buildroot places various buildroot-internal dot files in the package build directory
pull/2/head
Gleb Mazovetskiy 4 years ago committed by Alibek Omarov
parent
commit
23998ef720
  1. 2
      scripts/makepak.py

2
scripts/makepak.py

@ -24,7 +24,7 @@ for root, subFolders, files in os.walk(rootdir):
entry = FileEntry() entry = FileEntry()
impfilename = os.path.join(root,file) impfilename = os.path.join(root,file)
entry.filename = os.path.relpath(impfilename,rootdir).replace("\\","/") entry.filename = os.path.relpath(impfilename,rootdir).replace("\\","/")
if(entry.filename.startswith(".git")):continue if(entry.filename.startswith(".")):continue
print("pak: "+entry.filename) print("pak: "+entry.filename)
with open(impfilename, "rb") as importfile: with open(impfilename, "rb") as importfile:
pakfile.write(importfile.read()) pakfile.write(importfile.read())

Loading…
Cancel
Save