Skip to content

Commit

Permalink
attempt to fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NSPC911 committed Sep 2, 2024
1 parent 5ae986a commit 13ff11a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/firstruntrue.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
__pycache__

archive_creator.py
archives
31 changes: 31 additions & 0 deletions archive_creator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import zipfile
import os

# Directories and file paths
root_dir = os.path.dirname(os.path.abspath(__file__))
archives_dir = os.path.join(root_dir, 'archives')

# Ensure the archives directory exists
os.makedirs(archives_dir, exist_ok=True)

# List of all files in the root directory
all_files = [
f for f in os.listdir(root_dir)
if os.path.isfile(os.path.join(root_dir, f))
]

# Archive file specifications
archive_specs = {
'bat.zip': [f for f in all_files if f not in ['.gitignore', 'search.sh']],
'bash.zip': [f for f in all_files if f not in ['.gitignore', 'search.bat']],
'scoop.zip': [f for f in all_files if f not in ['.gitignore', 'search.bat', 'search.sh']]
}

# Create archives based on the specifications
for archive_name, files_to_include in archive_specs.items():
archive_path = os.path.join(archives_dir, archive_name)
with zipfile.ZipFile(archive_path, 'w', zipfile.ZIP_DEFLATED) as archive:
for file in files_to_include:
archive.write(os.path.join(root_dir, file), file)

print("Archives created successfully!")

0 comments on commit 13ff11a

Please sign in to comment.