git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757620
13f79535-47bb-0310-9956-
ffa450edef68
-#!/bin/bash
-ghci -fglasgow-exts -i/home/iproctor/code/projects/thrift/trunk/lib/hs/src -igen-hs Client.hs
+#!/bin/sh
+
+if [ -z $BASE_PKG ]; then
+ BASE_PKG=`ghc-pkg --simple-output list base-3* | sed -e "s/.*\(base-3\(.[0-9]\){3}\).*/\1/"`
+fi
+
+if [ -z $BASE ]; then
+ BASE=../..
+fi
+
+ghci -fglasgow-exts -package $BASE_PKG -hide-package syb -i$BASE/lib/hs/src -i$BASE/test/hs/gen-hs Client.hs
-#!/bin/bash
-ghci -fglasgow-exts -i/home/iproctor/code/projects/thrift/trunk/lib/hs/src -igen-hs Server.hs
+#!/bin/sh
+
+if [ -z $BASE_PKG ]; then
+ BASE_PKG=`ghc-pkg --simple-output list base-3* | sed -e "s/.*\(base-3\(.[0-9]\){3}\).*/\1/"`
+fi
+
+if [ -z $BASE ]; then
+ BASE=../..
+fi
+
+printf "Starting server... "
+ghc -fglasgow-exts -package $BASE_PKG -hide-package syb -i$BASE/lib/hs/src -i$BASE/test/hs/gen-hs Server.hs -e "putStrLn \"ready.\" >> Server.main"