Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't require the user to provide an argument to 'ghc-install.sh'.

  • Loading branch information...
commit b52e66cb943a464152815e53628c5d02d3d475bd 1 parent 801d80c
@23Skidoo authored
Showing with 19 additions and 3 deletions.
  1. +19 −3 ghc-install.sh
View
22 ghc-install.sh
@@ -1,5 +1,21 @@
#! /bin/sh
-runghc $1 configure -p
-runghc $1 build
-runghc $1 install
+SETUP_HS=
+if [ -e Setup.lhs ]
+then
+ SETUP_HS="Setup.lhs"
+fi
+if [ -e Setup.hs ]
+then
+ SETUP_HS="Setup.hs"
+fi
+
+if [ -z $SETUP_HS ]
+then
+ echo "Couldn't find the Setup.[l]hs file!"
+ exit 1;
+fi
+
+runghc $SETUP_HS configure -p
+runghc $SETUP_HS build
+runghc $SETUP_HS install
Please sign in to comment.
Something went wrong with that request. Please try again.