From 4acc100ea1f60cb7894f01e0a328007f67c43998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 5 Oct 2015 11:37:14 +0200 Subject: [PATCH] Add lint to pre-commit hook --- hooks/pre-commit | 8 ++++++++ tools/verify-rewritemeta.sh | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index 661f8ae23c..1a2ea76eae 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -1,3 +1,11 @@ #!/bin/sh +set -o errexit +set -o nounset +set -o pipefail + +# Redirect output to stderr. +exec 1>&2 + ./tools/verify-rewritemeta.sh +fdroid lint diff --git a/tools/verify-rewritemeta.sh b/tools/verify-rewritemeta.sh index 9ce0cfbe71..bec2b5c49d 100755 --- a/tools/verify-rewritemeta.sh +++ b/tools/verify-rewritemeta.sh @@ -7,9 +7,6 @@ set -o errexit set -o nounset set -o pipefail -# Redirect output to stderr. -exec 1>&2 - files=$(fdroid rewritemeta -l) if [[ -n "$files" ]]; then echo "ERROR: Run rewritemeta to fix formatting on these files:"