summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2015-10-04 16:28:03 +0200
committerAndrew Cady <d@jerkface.net>2015-10-04 16:28:03 +0200
commitc25e51572f7fa61b720cd1fcfb9f8ddaf0adc917 (patch)
treed9e021048b052f2d4e6292db6edf9e75bda4d2df
parent2ea5eb5415341de3e5b0a92ffb9779207e2bfdaf (diff)
fixed ghc/ghci/runghc on $PATH
-rw-r--r--dot/bashrc19
-rwxr-xr-xdot/local/bin/ghc7
l---------dot/local/bin/ghci1
l---------dot/local/bin/runghc1
-rw-r--r--dot/profile1
5 files changed, 18 insertions, 11 deletions
diff --git a/dot/bashrc b/dot/bashrc
index 38ee097..226276a 100644
--- a/dot/bashrc
+++ b/dot/bashrc
@@ -36,11 +36,28 @@ memoize_retval()
36 done 36 done
37 } 37 }
38 38
39 add_stack_binpath()
40 {
41 local result="$( stack path 2>&1 | while read x y
42 do
43 if [ "$x" = "bin-path:" ]
44 then
45 printf %s "$y"
46 break
47 fi
48 done
49 )"
50 [ "$result" ] && PATH=$result
51 }
52
39### bash settings, general environment ### 53### bash settings, general environment ###
40 54
41 add_path -a /usr/games 55 add_path -a /usr/games
42 add_path "$HOME/.cabal/bin" "$HOME/.local/bin" "$HOME/bin" 56 add_path "$HOME/.cabal/bin" "$HOME/.local/bin" "$HOME/bin"
43# add_path "/home/d/.stack/programs/i386-linux/ghc-7.10.1/bin/" 57
58 if have stack; then
59 add_stack_binpath
60 fi
44 61
45 if match_glob "*zsh" "$SHELL"; then 62 if match_glob "*zsh" "$SHELL"; then
46 autoload -U select-word-style 63 autoload -U select-word-style
diff --git a/dot/local/bin/ghc b/dot/local/bin/ghc
deleted file mode 100755
index 36c3656..0000000
--- a/dot/local/bin/ghc
+++ /dev/null
@@ -1,7 +0,0 @@
1#!/bin/sh
2prog=${0##*/}
3case "$prog" in
4 ghc|runghc|ghci) exec stack --no-system-ghc $prog;;
5esac
6echo "Not a stack command: $prog" >&2
7exit -1
diff --git a/dot/local/bin/ghci b/dot/local/bin/ghci
deleted file mode 120000
index a064d26..0000000
--- a/dot/local/bin/ghci
+++ /dev/null
@@ -1 +0,0 @@
1ghc \ No newline at end of file
diff --git a/dot/local/bin/runghc b/dot/local/bin/runghc
deleted file mode 120000
index a064d26..0000000
--- a/dot/local/bin/runghc
+++ /dev/null
@@ -1 +0,0 @@
1ghc \ No newline at end of file
diff --git a/dot/profile b/dot/profile
index 7305b38..c9db459 100644
--- a/dot/profile
+++ b/dot/profile
@@ -20,4 +20,3 @@ fi
20if [ -d "$HOME/bin" ] ; then 20if [ -d "$HOME/bin" ] ; then
21 PATH="$HOME/bin:$PATH" 21 PATH="$HOME/bin:$PATH"
22fi 22fi
23PATH="$HOME/.local/bin:$PATH"