diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-02-25 08:49:03 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-06-08 08:34:05 +0900 |
commit | 81cc12227f0109afec16a2b4ac4471508d23e1dc (patch) | |
tree | 57f05aea55ce57a0b1371d5100504d24ea234a78 | |
parent | a1ebe76d7f097d7d0522ab522de7ef80feba5484 (diff) | |
download | dotfiles-81cc12227f0109afec16a2b4ac4471508d23e1dc.tar.gz |
fix cabal --user bin path on Windows
-rw-r--r-- | .bashrc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -4,8 +4,14 @@ PS1='\[\033[00;33m\]\h \[\033[00;32m\]\w \[\033[00;34m\]\$\[\033[00m\] ' # --- additions to $PATH -if [ -d "$APPDATA/cabal/bin" ]; then - export PATH="$APPDATA/cabal/bin:$PATH" +# First make $APPDATA use the pathing conventions that the rest of +# $PATH appears to use: C: should be /c and forward- not +# backward-slashes. +CYG_APPDATA=$(echo $APPDATA | sed -e "s|C:|/c|;s/\\\\/\//g") + +# Now see if we should add the cabal --user binaries directory. +if [ -d "$CYG_APPDATA/cabal/bin" ]; then + export PATH="$CYG_APPDATA/cabal/bin:$PATH" fi # --- aliases |