Skip to content

Commit

Permalink
Merge pull request #46 from arron1993/master-workshop-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson authored Mar 21, 2022
2 parents b453a6d + 699956d commit c0f065f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions keys.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import glob
import os
import shutil


def copy(moddir):
keysdir = os.path.join(moddir, "keys")
if os.path.exists(keysdir):
for o in os.listdir(keysdir):
keyfile = os.path.join(keysdir, o)
if not os.path.isdir(keyfile):
shutil.copy2(keyfile, "/arma3/keys")
keys = glob.glob(os.path.join(moddir, "**/*.bikey"))
if len(keys) > 0:
for key in keys:
if not os.path.isdir(key):
shutil.copy2(key, "/arma3/keys")
else:
print("Missing keys:", keysdir)
print("Missing keys:", moddir)


if __name__ == "__main__":
for moddir in glob.glob("/arma3/steamapps/workshop/content/107410/*"):
copy(moddir)

0 comments on commit c0f065f

Please sign in to comment.