-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76d66da
commit 475706d
Showing
2 changed files
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import zipfile | ||
import os | ||
|
||
zipped_dirs = [ | ||
"overrides", | ||
"manifest.json", | ||
"modlist.html", | ||
"README.md", | ||
] | ||
MODPACK_NAME = "Creative-Drawers-Producer" | ||
VERSION = "m1.0.5" | ||
|
||
print(f"> Start Packing Modpack - {MODPACK_NAME} {VERSION}") | ||
with zipfile.ZipFile(f"{MODPACK_NAME}-{VERSION}.zip", "w") as archive: | ||
for directory in zipped_dirs: | ||
if os.path.isdir(directory): | ||
for root, _, files in os.walk(directory): | ||
for file in files: | ||
_path = os.path.join(root, file) | ||
archive.write(_path) | ||
print(f'>...> Packing "{_path}"') | ||
else: | ||
archive.write(directory) | ||
print(f'>...> Packing "{directory}"') | ||
print("> Modpack Packing Finished") |