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

Improve init #160

Open
WillAbides opened this issue Jun 2, 2023 · 0 comments
Open

Improve init #160

WillAbides opened this issue Jun 2, 2023 · 0 comments

Comments

@WillAbides
Copy link
Owner

Improve bindown init to:

  1. Add cache and install_dir to .bindown.yaml if they are set to non-default.

  2. Add cache and install_dir directories to .gitignore.

Need to add an --install-dir param to init. It can use the global --cache option param for setting the cache dir. It
also needs a --no-gitignore param to prevent it.

The .gitignore file should be in the same directory as .bindown.yaml even if it is in a subdirectory of the git
repo.

The algorithm for .gitignore should be something like:

  1. If git isn't available in PATH, abort
  2. If .bindown.yaml isn't being created inside a git repo, abort
  3. For each directory of cache and install_dir
    1. Use git check-ignore to see if the directory is already ignored. If so continue to next directory.
    2. Append the directory to .gitignore in the same directory as .bindown.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant