1
0
mirror of https://github.com/docker/cli.git synced 2025-08-29 00:47:54 +03:00
Files
cli/scripts/validate/check-git-diff
Jean-Pierre Huynh 24c06c1723 Add scripts folder to shellcheck
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-19 16:33:58 +01:00

18 lines
236 B
Bash
Executable File

#!/bin/sh
set -eu
DIFF_PATH=$1
DIFF=$(git status --porcelain -- "$DIFF_PATH")
if [ "$DIFF" ]; then
echo
echo "These files were changed:"
echo
echo "$DIFF"
echo
exit 1
else
echo "$DIFF_PATH is correct"
fi;