diff options
Diffstat (limited to '%HOME%')
-rw-r--r-- | %HOME%/.bash_utils/git.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/%HOME%/.bash_utils/git.sh b/%HOME%/.bash_utils/git.sh index ad7c6ee..772750b 100644 --- a/%HOME%/.bash_utils/git.sh +++ b/%HOME%/.bash_utils/git.sh @@ -5,6 +5,8 @@ # For details, see https://github.com/egor-tensin/cygwin-home. # Distributed under the MIT License. +source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/text.sh" + list_repo_files() ( set -o errexit -o nounset -o pipefail @@ -69,6 +71,32 @@ tighten_repo_security() ( chmod 0700 .git ) +doslint_repo() ( + set -o errexit -o nounset -o pipefail + + local -a paths + local path + + while IFS= read -d '' -r path; do + paths+=("$path") + done < <( list_repo_files -z ) + + doslint ${paths[@]+"${paths[@]}"} +) + +lint_repo() ( + set -o errexit -o nounset -o pipefail + + local -a paths + local path + + while IFS= read -d '' -r path; do + paths+=("$path") + done < <( list_repo_files -z ) + + lint ${paths[@]+"${paths[@]}"} +) + backup_repo() ( set -o errexit -o nounset -o pipefail |