]> git.immae.eu Git - github/fretlink/ansible-clever.git/blame_incremental - scripts/dhall_check.sh
Merge pull request #80 from gaetanfl/bump_nix_version
[github/fretlink/ansible-clever.git] / scripts / dhall_check.sh
... / ...
CommitLineData
1#!/usr/bin/env bash
2
3set -eo pipefail
4
5go() {
6 local ERROR=0
7 while IFS= read -r -d '' file
8 do
9 cd "$(dirname "$file")" || exit
10 echo "Typechecking ${file}"
11 if ! dhall --explain resolve < "$(basename "$file")" >/dev/null; then
12 echo "Failed to resolve $file"
13 ERROR=1
14 fi;
15 cd - >/dev/null || exit
16 done < <(find . -type f -name "*.dhall" -print0)
17 exit $ERROR;
18}
19
20go