mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
- yamllint - shfmt config - fix Go bin path - fix git credentials config - add nvm default packages - updated Brewfile
20 lines
537 B
Bash
Executable File
20 lines
537 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Check git repo's files .gitattributes and are all of them mapped.
|
|
# Ismo Vuorinen <https://github.com/ivuorinen> 2022
|
|
#
|
|
|
|
if ! command -v git &> /dev/null; then
|
|
echo "git could not be found, please install it first"
|
|
exit 1
|
|
fi
|
|
|
|
missing_attributes=$(git ls-files | git check-attr -a --stdin | grep "text: auto")
|
|
|
|
if [[ "$missing_attributes" ]]; then
|
|
echo ".gitattributes rule missing for the following files:"
|
|
echo "$missing_attributes"
|
|
else
|
|
echo "All files have a corresponding rule in .gitattributes"
|
|
fi
|