First stab at an installer package for the Mac
[ghc-hetmet.git] / distrib / MacOS / installer-scripts / relocate
diff --git a/distrib/MacOS/installer-scripts/relocate b/distrib/MacOS/installer-scripts/relocate
new file mode 100644 (file)
index 0000000..6642552
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# Post install script that relocates the GHC installation to a /usr tree rooted
+# GHC framework's versioned contents folder.
+
+INSTALL_DIR=`pwd`
+CONTENTS_FOLDER_PATH=GHC.framework/Versions/Current
+
+cd ${CONTENTS_FOLDER_PATH}/ghc; \
+  ./configure --prefix=${INSTALL_DIR}/${CONTENTS_FOLDER_PATH}/usr
+cd ${CONTENTS_FOLDER_PATH}/ghc; \
+  make install
+
+# TODO: remove the binary dist tree
\ No newline at end of file