mirror of
https://github.com/libratbag/piper.git
synced 2026-02-20 07:33:50 -05:00
22 lines
421 B
Bash
Executable File
22 lines
421 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -z "$MESON_SOURCE_ROOT" ]; then
|
|
echo >&2 "Expected \$MESON_SOURCE_ROOT to be set. Are you sure you are running this through ninja?"
|
|
exit 100
|
|
fi
|
|
|
|
cd "$MESON_SOURCE_ROOT" || exit 101
|
|
|
|
files=$(git ls-files "*.py" "*.py.in")
|
|
if [ -z "$files" ]; then
|
|
echo >&2 "Git didn't find any files"
|
|
exit 77
|
|
fi
|
|
|
|
command -v black >/dev/null 2>&1 || {
|
|
echo >&2 "black is not installed"
|
|
exit 77
|
|
}
|
|
|
|
black --check $files
|