This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

zsh version of cabal workaround

By: gatoatigrado3 on Jan 10th, 2012  |  syntax: None  |  size: 0.37 KB  |  views: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. )
clone this paste RAW Paste Data