From 723b37b5c505aef692e1489b3529d22e5067c1aa Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 14 Oct 2016 05:59:51 +0300 Subject: add doslint_repo, lint_repo --- %HOME%/.bash_utils/git.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to '%HOME%/.bash_utils') 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 -- cgit v1.2.3