Ajout : rangement.
[tool/hledger.git] / script / ghc-pkg-clean
1 #!/bin/sh -eux
2
3 # DESCRIPTION: unregister broken GHC packages.
4 # Run this a few times to resolve dependency rot in installed packages.
5 # ghc-pkg-clean -f cabal/dev/packages*.conf also works.
6 packages=$(ghc-pkg check $* 2>&1 |
7 grep problems |
8 awk '{print $6}' |
9 sed -e 's/:$//'
10 )
11 for p in $packages
12 do
13 echo unregistering $p
14 ghc-pkg "$@" unregister $p
15 done