Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions asimov
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,26 @@ readonly ASIMOV_VENDOR_DIR_SENTINELS=(
'vendor Gemfile' # Bundler (Ruby)
)

# A list of "fixed directories".
#
# Directories will be always excluded
readonly ASIMOV_FIXED_DIRS=(
~/.cache
~/.dts
~/.kube/cache
~/.kube/http-cache
~/.m2
Copy link

@dyorgio dyorgio Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to don't exclude ~/.m2, but ~/.m2/repository.
settings.xml is inside ~/.m2 and is a very important file (can keep passwords and secrets)

~/.npm/_cacache
~/.npm/_logs
~/.nvm/.cache
~/.nvm/versions
~/.rvm/archives
~/.sdkman/archives
~/.sdkman/tmp
~/.serverless/cache
~/.serverless/tracking-cache
)

# Exclude the given paths from Time Machine backups.
# Reads the newline-separated list of paths from stdin.
exclude_file() {
Expand Down Expand Up @@ -100,3 +120,7 @@ printf '\n\033[0;36mFinding dependency directories with corresponding definition
find "${ASIMOV_ROOT}" \( "${find_parameters_skip[@]}" \) \( -false "${find_parameters_vendor[@]}" \) \
| exclude_file \
;

for dir in "${ASIMOV_FIXED_DIRS[@]}"; do
echo "${dir}" | exclude_file
done