osrm-backend/scripts/error_on_dirty.sh

18 lines
243 B
Bash
Raw Permalink Normal View History

2017-04-28 10:43:00 -04:00
#!/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
2022-06-27 19:14:28 -04:00
git diff
2017-04-28 10:43:00 -04:00
exit 1
else
exit 0
fi