Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add support for downloading specific folders from Git repositories #267

Open
flier268 opened this issue Aug 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@flier268
Copy link

Is your feature request related to a problem? Please describe.
Currently, there's no straightforward way to download a specific folder from a Git repository within this Docker image. This is particularly problematic when trying to use modules that aren't packaged and released, but are available on Git. Typically, users would use tools like DownGit for this purpose, but this isn't possible within the current Docker environment.
Describe the solution you'd like
I would like to see support added for downloading specific folders from Git repositories. This could be achieved by:

Integrating DownGit functionality directly into the Docker image.
Implementing a custom solution that allows users to specify a Git URL and a subfolder path, then downloads only that folder.
Adding a tool or script that can clone a repository and extract a specific folder, then clean up the rest.

Describe alternatives you've considered

Manually downloading the folder outside the Docker environment and then copying it in, but this defeats the purpose of having a self-contained system.
Using git sparse-checkout, but this requires more complex setup and might not be ideal for all use cases.
Writing a custom script to use git archive, but this would require additional setup and maintenance.

Additional context
This feature would greatly improve the usability of the Docker image, especially for users who need to work with unpacked modules or specific parts of larger repositories. It would streamline the workflow and make it easier to integrate various Git-hosted resources into projects.

@flier268 flier268 added the enhancement New feature or request label Aug 19, 2024
@erdoking
Copy link

maybe a workaround:

example:
https://github.com/BlackRabbitMsk/projectz-free-modpack/ can be AUTO ZIP by github as https://github.com/BlackRabbitMsk/projectz-free-modpack/archive/refs/heads/main.zip

  1. open the repo
  2. klick on the green CODE Button
  3. Download Zip (copy Link)
  4. the nice mods_downloader.sh extract the zip and search for all directorys containing a Modinfo.xml
  5. the folders automatic moved to the MODS directory

@flier268
Copy link
Author

Thanks for @erdoking , bit I don't want all of them in the repo, just someone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants