summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-02-25 08:49:03 +0900
committerSean Whitton <spwhitton@spwhitton.name>2015-06-10 15:44:04 +0900
commitcbe3910cf966765ee8706dea5472e2fb1f7bab4c (patch)
treea481c7f7a542985c7c7aa194353fd69781abb159
parent88a50c7f65ada46e7d459860063dd254bc111bc0 (diff)
downloaddotfiles-cbe3910cf966765ee8706dea5472e2fb1f7bab4c.tar.gz
fix cabal --user bin path on Windows
-rw-r--r--.bashrc10
1 files changed, 8 insertions, 2 deletions
diff --git a/.bashrc b/.bashrc
index e356b731..501709c9 100644
--- a/.bashrc
+++ b/.bashrc
@@ -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