diff options
author | Andrew Cady <d@jerkface.net> | 2015-10-04 16:28:03 +0200 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2015-10-04 16:28:03 +0200 |
commit | c25e51572f7fa61b720cd1fcfb9f8ddaf0adc917 (patch) | |
tree | d9e021048b052f2d4e6292db6edf9e75bda4d2df | |
parent | 2ea5eb5415341de3e5b0a92ffb9779207e2bfdaf (diff) |
fixed ghc/ghci/runghc on $PATH
-rw-r--r-- | dot/bashrc | 19 | ||||
-rwxr-xr-x | dot/local/bin/ghc | 7 | ||||
l--------- | dot/local/bin/ghci | 1 | ||||
l--------- | dot/local/bin/runghc | 1 | ||||
-rw-r--r-- | dot/profile | 1 |
5 files changed, 18 insertions, 11 deletions
@@ -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 | ||
2 | prog=${0##*/} | ||
3 | case "$prog" in | ||
4 | ghc|runghc|ghci) exec stack --no-system-ghc $prog;; | ||
5 | esac | ||
6 | echo "Not a stack command: $prog" >&2 | ||
7 | exit -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 @@ | |||
1 | ghc \ 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 @@ | |||
1 | ghc \ 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 | |||
20 | if [ -d "$HOME/bin" ] ; then | 20 | if [ -d "$HOME/bin" ] ; then |
21 | PATH="$HOME/bin:$PATH" | 21 | PATH="$HOME/bin:$PATH" |
22 | fi | 22 | fi |
23 | PATH="$HOME/.local/bin:$PATH" | ||