aboutsummaryrefslogtreecommitdiff
path: root/hooks/pre-commit
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-11-30 06:55:11 -0500
committerB. Watson <urchlay@slackware.uk>2026-11-30 06:55:11 -0500
commit346167ea0bda2346b415c31507905e95faa0b1fd (patch)
tree61c98cc5aa3f65fde9603c2e45c4325b2df1a9e2 /hooks/pre-commit
parent77f9ffb2de1e88fcce24c4ee420731b3147a1bc6 (diff)
downloadsbo-maintainer-tools-346167ea0bda2346b415c31507905e95faa0b1fd.tar.gz
hooks/*: replace tab indents with 2 spaces each.
Diffstat (limited to 'hooks/pre-commit')
-rwxr-xr-xhooks/pre-commit42
1 files changed, 21 insertions, 21 deletions
diff --git a/hooks/pre-commit b/hooks/pre-commit
index 045b2b8..f630400 100755
--- a/hooks/pre-commit
+++ b/hooks/pre-commit
@@ -113,30 +113,30 @@ EOF
# The fugly grep regex below matches only the actual .info files, named
# category/prgnam/prgnam.info (and not other files named .info).
if [ "${MD5OK:-no}" != "yes" ]; then
- while read filename; do
- check_info_file "$filename"
- done < <(git diff --cached --name-only | grep '^[^/]*/\([^/]*\)/\1.info' || exit 0)
+ while read filename; do
+ check_info_file "$filename"
+ done < <(git diff --cached --name-only | grep '^[^/]*/\([^/]*\)/\1.info' || exit 0)
fi
if [ "${SBOLINT:-yes}" = "yes" ]; then
- sbolintfailed=""
- if ! which sbolint &>/dev/null; then
- echo "WARNING: can't find sbolint in PATH, no linting will be done"
- else
- while read build; do
- # If there's no slack-desc or README, assume the build was removed.
- # The directory still might exist after a "git rm -rf" because it
- # might contain untracked files (e.g. the source tarball).
- if [ -e "$build/slack-desc" -o -e "$build/README" ]; then
- sbolint "$build" || sbolintfailed=1
- fi
- done < <(git diff --cached --name-only | cut -d/ -f1,2 | sort -u)
- fi
- if [ -n "$sbolintfailed" ]; then
- echo "*** sbolint failed, fix the errors or set SBOLINT=no"
- echo "*** in the environment to commit anyway."
- exit 1
- fi
+ sbolintfailed=""
+ if ! which sbolint &>/dev/null; then
+ echo "WARNING: can't find sbolint in PATH, no linting will be done"
+ else
+ while read build; do
+ # If there's no slack-desc or README, assume the build was removed.
+ # The directory still might exist after a "git rm -rf" because it
+ # might contain untracked files (e.g. the source tarball).
+ if [ -e "$build/slack-desc" -o -e "$build/README" ]; then
+ sbolint "$build" || sbolintfailed=1
+ fi
+ done < <(git diff --cached --name-only | cut -d/ -f1,2 | sort -u)
+ fi
+ if [ -n "$sbolintfailed" ]; then
+ echo "*** sbolint failed, fix the errors or set SBOLINT=no"
+ echo "*** in the environment to commit anyway."
+ exit 1
+ fi
fi
exit 0