Advertisement
gatoatigrado3

zsh version of cabal workaround

Jan 10th, 2012
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function cabal() (
  2. if [ "$1" = "install" ]; then
  3. out=$(command cabal --dry-run -v2 "$@" 2>&1)
  4. if echo "$out" | egrep -c '\((reinstall|new version)\)' >/dev/null; then
  5. echo "$out"
  6. echo "
  7. [NOTE] To proceed with installation, possibly breaking packages above, run
  8. [NOTE] > command cabal $*"
  9. return 1
  10. fi
  11. fi
  12. command cabal "$@"
  13. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement