tmp dirs target to farf (#5079)

This commit is contained in:
Rob Walker
2019-07-12 18:28:42 -07:00
committed by GitHub
parent 1c966aac25
commit 0d27515d09
70 changed files with 79 additions and 13 deletions

View File

@@ -46,16 +46,22 @@ if _ git --no-pager grep -n 'Default::default()' -- '*.rs'; then
fi
# Let's keep a .gitignore for every crate, ensure it's got
# /target/ in it
# /target/ and /farf/ in it
declare gitignores_ok=true
for i in $(git --no-pager ls-files \*/Cargo.toml ); do
dir=$(dirname "$i")
if [[ ! -f $dir/.gitignore ]]; then
echo 'error: nits.sh .gitnore missing for crate '"$dir" >&2
gitignores_ok=false
elif ! grep -q -e '^/target/$' "$dir"/.gitignore; then
else
if ! grep -q -e '^/target/$' "$dir"/.gitignore; then
echo 'error: nits.sh "/target/" apparently missing from '"$dir"'/.gitignore' >&2
gitignores_ok=false
fi
if ! grep -q -e '^/farf/$' "$dir"/.gitignore ; then
echo 'error: nits.sh "/farf/" apparently missing from '"$dir"'/.gitignore' >&2
gitignores_ok=false
fi
fi
done
"$gitignores_ok"