gdritter repos GRUtils / 7f102d7
Added some error-checking to ghc-wrapper Getty Ritter 8 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Collapse all Expand all
8080 how you lay things out! While I suspect it shouldn't actively break anything,
8181 be careful about using it!
8282 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 "$@"
8391 else
8492 exec /home/gdritter/install/$(cat ~/.current-ghc)/bin/$(basename $0) "$@"
8593 fi