fdroid-data/hooks/pre-commit

15 lines
255 B
Bash
Executable File

#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
# Redirect output to stderr.
exec 1>&2
apps="$(git diff --cached --name-only --diff-filter=ACM | sed -n 's,metadata/\([^/]*\)\.yml,\1,p')"
if [[ -n "$apps" ]]; then
fdroid lint -f $apps
fi