osrm-backend/scripts/error_on_dirty.sh
2022-06-28 00:14:28 +01:00

18 lines
243 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
MSG="The following files have been modified:"
dirty=$(git ls-files --modified)
if [[ $dirty ]]; then
echo $MSG
echo $dirty
git diff
exit 1
else
exit 0
fi