aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_utils
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-14 05:59:51 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-14 05:59:51 +0300
commit723b37b5c505aef692e1489b3529d22e5067c1aa (patch)
treef70b3c14cfe2ec2547b8306d097dc0bb0ef9a866 /%HOME%/.bash_utils
parentadd str_tolower, str_toupper, str_contains (diff)
downloadlinux-home-723b37b5c505aef692e1489b3529d22e5067c1aa.tar.gz
linux-home-723b37b5c505aef692e1489b3529d22e5067c1aa.zip
add doslint_repo, lint_repo
Diffstat (limited to '')
-rw-r--r--%HOME%/.bash_utils/git.sh28
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