From 97ddab86bf981f38236692a354eeaccb4e822b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 24 Sep 2015 22:55:26 -0700 Subject: [PATCH] verify-rewritemeta: use rewritemeta -l This keeps it from having to modify the files on metadata/. --- tools/verify-rewritemeta.sh | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/tools/verify-rewritemeta.sh b/tools/verify-rewritemeta.sh index ec503fcb2d..99722fb432 100755 --- a/tools/verify-rewritemeta.sh +++ b/tools/verify-rewritemeta.sh @@ -4,28 +4,12 @@ set -e -err() { - echo "$@" >&2 +files=$(fdroid rewritemeta -l) + +if [[ -n "$files" ]]; then + echo "Run fdroid rewritemeta to fix formatting on these files:" + echo "$files" exit 1 -} - -has_changed_files() { - git update-index -q --refresh - git diff-index --quiet HEAD -- && return 1 || return 0 -} - -list_changed_files() { - git diff-index --name-only HEAD -- || return 0 -} - -if has_changed_files; then - list_changed_files - err "Unstaged changes found; refusing to continue." fi -fdroid rewritemeta - -if has_changed_files; then - list_changed_files - err "Run rewritemeta to fix formatting on those files." -fi +exit 0