Improve bindown init to:
-
Add cache and install_dir to .bindown.yaml if they are set to non-default.
-
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:
- If
git isn't available in PATH, abort
- If
.bindown.yaml isn't being created inside a git repo, abort
- For each directory of
cache and install_dir
- Use
git check-ignore to see if the directory is already ignored. If so continue to next directory.
- Append the directory to
.gitignore in the same directory as .bindown.yaml
Improve
bindown initto:Add
cacheandinstall_dirto.bindown.yamlif they are set to non-default.Add
cacheandinstall_dirdirectories to.gitignore.Need to add an
--install-dirparam to init. It can use the global--cacheoption param for setting the cache dir. Italso needs a
--no-gitignoreparam to prevent it.The
.gitignorefile should be in the same directory as.bindown.yamleven if it is in a subdirectory of the gitrepo.
The algorithm for
.gitignoreshould be something like:gitisn't available in PATH, abort.bindown.yamlisn't being created inside a git repo, abortcacheandinstall_dirgit check-ignoreto see if the directory is already ignored. If so continue to next directory..gitignorein the same directory as.bindown.yaml