#!/bin/sh
set -e
set -o pipefail
export LC_ALL=C
for dep in git; do
if ! which -s $dep; then
echo "error: the '$dep' dependency is missing"
if [ $dep = "git" ]; then
echo "... please install the 'git' package"
fi
exit 1
fi
done
git diff HEAD "$@" |
awk -F / '/^diff/ && $2 !~ /[[:upper:]]/ && $3 !~ /^Makefile/ { print $2 "/" $3 }' |
sort -u