Skip to content

Commit

Permalink
Make check-cabal-files.sh shellcheck-compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Apr 25, 2024
1 parent cb90ab3 commit 616f492
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions scripts/ci/check-cabal-files.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
#
# Runs "cabal check" in all directories containing a versioned .cabal file

for x in $(find . -name '*.cabal' | grep -v dist-newstyle | cut -c 3-); do
(
d=$(dirname $x)
echo "== $d =="
cd $d
cabal check
)
for cabal_file in $(git ls-files "*.cabal")
do
cd "$(dirname "$cabal_file")" || { echo "Cannot cd"; exit 1; }
echo "$(pwd)> cabal-check"
cabal check
cd - || { echo "Cannot cd back"; exit 1; }
done

0 comments on commit 616f492

Please sign in to comment.