mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-07-13 17:51:43 +00:00
verify-rewritemeta: use rewritemeta -l
This keeps it from having to modify the files on metadata/.
This commit is contained in:
parent
a803026e79
commit
97ddab86bf
1 changed files with 6 additions and 22 deletions
|
|
@ -4,28 +4,12 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
err() {
|
files=$(fdroid rewritemeta -l)
|
||||||
echo "$@" >&2
|
|
||||||
|
if [[ -n "$files" ]]; then
|
||||||
|
echo "Run fdroid rewritemeta to fix formatting on these files:"
|
||||||
|
echo "$files"
|
||||||
exit 1
|
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
|
fi
|
||||||
|
|
||||||
fdroid rewritemeta
|
exit 0
|
||||||
|
|
||||||
if has_changed_files; then
|
|
||||||
list_changed_files
|
|
||||||
err "Run rewritemeta to fix formatting on those files."
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue