Added some error-checking to ghc-wrapper
Getty Ritter
8 years ago
80 | 80 | how you lay things out! While I suspect it shouldn't actively break anything, |
81 | 81 | be careful about using it! |
82 | 82 | EOF |
83 | elif [ ! -e ~/.current-ghc ]; then | |
84 | # we haven't run this script before and don't have a .current-ghc, and | |
85 | # we rely on having a binary _somewhere_, so let's use a default one | |
86 | exec /usr/bin/ghc "$@" | |
87 | elif [ ! -e /home/gdritter/install/$(cat ~/.current-ghc)/bin/$(basename $0) ]; then | |
88 | # we HAVE a .current-ghc but it doesn't exist, so let's also default to | |
89 | # the one in /usr/bin | |
90 | exec /usr/bin/ghc "$@" | |
83 | 91 | else |
84 | 92 | exec /home/gdritter/install/$(cat ~/.current-ghc)/bin/$(basename $0) "$@" |
85 | 93 | fi |